org.codehaus.groovy.runtime
Class DefaultGroovyMethodsSupport
java.lang.Object
org.codehaus.groovy.runtime.DefaultGroovyMethodsSupport
- Direct Known Subclasses:
- DefaultGroovyMethods, PluginDefaultGroovyMethods
public class DefaultGroovyMethodsSupport
- extends java.lang.Object
Support methods for DefaultGroovyMethods and PluginDefaultMethods.
Field Summary |
private static java.util.logging.Logger |
LOG
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LOG
private static final java.util.logging.Logger LOG
DefaultGroovyMethodsSupport
public DefaultGroovyMethodsSupport()
subListBorders
protected static DefaultGroovyMethodsSupport.RangeInfo subListBorders(int size,
IntRange range)
subListBorders
protected static DefaultGroovyMethodsSupport.RangeInfo subListBorders(int size,
EmptyRange range)
normaliseIndex
protected static int normaliseIndex(int i,
int size)
- This converts a possibly negative index to a real index into the array.
- Parameters:
i
- the unnormalised indexsize
- the array size
- Returns:
- the normalised index
closeWithWarning
public static void closeWithWarning(java.io.Closeable c)
- Close the Closeable. Logging a warning if any problems occur.
- Parameters:
c
- the thing to close
closeQuietly
public static void closeQuietly(java.io.Closeable c)
- Close the Closeable. Ignore any problems that might occur.
- Parameters:
c
- the thing to close
cloneSimilarCollection
protected static java.util.Collection cloneSimilarCollection(java.util.Collection orig,
int newCapacity)
cloneObject
private static java.lang.Object cloneObject(java.lang.Object orig)
createSimilarOrDefaultCollection
protected static java.util.Collection createSimilarOrDefaultCollection(java.lang.Object object)
createSimilarCollection
protected static java.util.Collection createSimilarCollection(java.util.Collection collection)
createSimilarCollection
protected static java.util.Collection createSimilarCollection(java.util.Collection orig,
int newCapacity)
createSimilarList
protected static java.util.List createSimilarList(java.util.List orig,
int newCapacity)
createSimilarSet
protected static java.util.Set createSimilarSet(java.util.Set orig)
createSimilarMap
protected static java.util.Map createSimilarMap(java.util.Map orig)
cloneSimilarMap
protected static java.util.Map cloneSimilarMap(java.util.Map orig)
sameType
protected static boolean sameType(java.util.Collection[] cols)
- Determines if all items of this array are of the same type.
- Parameters:
cols
- an array of collections
- Returns:
- true if the collections are all of the same type
Copyright © ${year} The Codehaus. All Rights Reserved.