public class DefaultGroovyMethodsSupport
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
protected static class |
DefaultGroovyMethodsSupport.RangeInfo |
Constructor and Description |
---|
DefaultGroovyMethodsSupport() |
Modifier and Type | Method and Description |
---|---|
protected static java.util.Collection |
cloneSimilarCollection(java.util.Collection left,
int newCapacity) |
protected static java.util.Map |
cloneSimilarMap(java.util.Map left) |
protected static java.util.Collection |
createSimilarCollection(java.util.Collection collection) |
protected static java.util.Collection |
createSimilarCollection(java.util.Collection collection,
int newCapacity) |
protected static java.util.List |
createSimilarList(java.util.List left,
int newCapacity) |
protected static java.util.Collection |
createSimilarOrDefaultCollection(java.lang.Object object) |
protected static java.util.Set |
createSimilarSet(java.util.Set self) |
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,
EmptyRange range) |
protected static DefaultGroovyMethodsSupport.RangeInfo |
subListBorders(int size,
IntRange range) |
protected static DefaultGroovyMethodsSupport.RangeInfo subListBorders(int size, IntRange range)
protected static DefaultGroovyMethodsSupport.RangeInfo subListBorders(int size, EmptyRange range)
protected static int normaliseIndex(int i, int size)
i
- the unnormalised indexsize
- the array sizeprotected static java.util.Collection cloneSimilarCollection(java.util.Collection left, int newCapacity)
protected static java.util.Collection createSimilarOrDefaultCollection(java.lang.Object object)
protected static java.util.Collection createSimilarCollection(java.util.Collection collection)
protected static java.util.Collection createSimilarCollection(java.util.Collection collection, int newCapacity)
protected static java.util.List createSimilarList(java.util.List left, int newCapacity)
protected static java.util.Map cloneSimilarMap(java.util.Map left)
protected static java.util.Set createSimilarSet(java.util.Set self)
protected static boolean sameType(java.util.Collection[] cols)
cols
- an array of collections