|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.codehaus.groovy.runtime.DefaultGroovyMethodsSupport
public class DefaultGroovyMethodsSupport extends java.lang.Object
Support methods for DefaultGroovyMethods and PluginDefaultMethods.
Nested Class Summary | |
---|---|
protected static class |
DefaultGroovyMethodsSupport.RangeInfo
|
Method Summary | |
---|---|
protected static java.util.Collection
|
cloneSimilarCollection(java.util.Collection orig, int newCapacity)
|
protected static java.util.Map
|
cloneSimilarMap(java.util.Map orig)
|
static void
|
closeQuietly(java.io.Closeable c)
Close the Closeable. |
static void
|
closeWithWarning(java.io.Closeable c)
Close the Closeable. |
protected static java.lang.Object[]
|
createSimilarArray(java.lang.Object[] orig, int newCapacity)
|
protected static java.util.Collection
|
createSimilarCollection(java.util.Collection collection)
|
protected static java.util.Collection
|
createSimilarCollection(java.util.Collection orig, int newCapacity)
|
protected static java.util.List
|
createSimilarList(java.util.List orig, int newCapacity)
|
protected static java.util.Map
|
createSimilarMap(java.util.Map orig)
|
protected static java.util.Collection
|
createSimilarOrDefaultCollection(java.lang.Object object)
|
protected static java.util.Set
|
createSimilarSet(java.util.Set orig)
|
protected static int
|
normaliseIndex(int i, int size)
This converts a possibly negative index to a real index into the array. |
protected static boolean
|
sameType(java.util.Collection[] cols)
Determines if all items of this array are of the same type. |
protected static DefaultGroovyMethodsSupport.RangeInfo
|
subListBorders(int size, Range range)
|
protected static DefaultGroovyMethodsSupport.RangeInfo
|
subListBorders(int size, EmptyRange range)
|
Methods inherited from class java.lang.Object | |
---|---|
java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Method Detail |
---|
if (answer != null) return answer; protected static java.util.Collection cloneSimilarCollection(java.util.Collection orig, int newCapacity)
// fall back to some defaults protected static java.util.Map cloneSimilarMap(java.util.Map orig)
public static void closeQuietly(java.io.Closeable c)
c
- the thing to close
public static void closeWithWarning(java.io.Closeable c)
c
- the thing to close
protected static java.lang.Object[] createSimilarArray(java.lang.Object[] orig, int newCapacity)
protected static java.util.Collection createSimilarCollection(java.util.Collection collection)
protected static java.util.Collection createSimilarCollection(java.util.Collection orig, int newCapacity)
protected static java.util.List createSimilarList(java.util.List orig, int newCapacity)
if (orig instanceof Properties) { protected static java.util.Map createSimilarMap(java.util.Map orig)
protected static java.util.Collection createSimilarOrDefaultCollection(java.lang.Object object)
return new LinkedHashSet(); protected static java.util.Set createSimilarSet(java.util.Set orig)
protected static int normaliseIndex(int i, int size)
i
- the unnormalised indexsize
- the array size
if (all.size() == 0) protected static boolean sameType(java.util.Collection[] cols)
cols
- an array of collections
protected static DefaultGroovyMethodsSupport.RangeInfo subListBorders(int size, Range range)
protected static DefaultGroovyMethodsSupport.RangeInfo subListBorders(int size, EmptyRange range)
Groovy Documentation