public static String reverse(String self)
provides a reverse() method for String.Note
While this class contains many 'public' static methods, it is primarily regarded as an internal class (its internal package name suggests this also). We value backwards compatibility of these methods when used within Groovy but value less backwards compatibility at the Java method call level. I.e. future versions of Groovy may remove or move a method call in this file but would normally aim to keep the method available from within Groovy.
| Modifier and Type | Class and Description |
|---|---|
| private static class | |
| private static class | |
| private static class | |
| private static class | |
| private static class | |
| private static class | |
| private static class | |
| private static class | |
| private static class | |
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| public static final Class | |
| private static final BigInteger | |
| private static final BigInteger | |
| private static final BigInteger | |
| private static final BigInteger | |
| private static final NumberAwareComparator | |
| public static final Class | |
| private static final Object[] | |
| private static final Logger | |
| private static final Integer | |
| private static Random |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static int | |
| public static long | |
| public static float | |
| public static double | |
| public static <T> boolean | Returns: true if this collection changed as a result of the calla Collection to be modified self, T[] array containing elements to be added to this collection items)Modifies the collection by adding all of the elements in the specified array to the collection. |
| public static <T> boolean | Returns: true if this collection changed as a result of the calla list to be modified self, int index at which to insert the first element from the
specified array index, T[] array containing elements to be added to this collection items)Modifies this list by inserting all of the elements in the specified array into the list at the specified position. |
| public static <T> boolean | Returns: true if the collection changedthe collection self, Iterator<? extends T> the items to add items)Adds all items from the iterator to the Collection. |
| public static <T> boolean | Returns: true if the collection changedthe collection self, Iterable<? extends T> the items to add items)Adds all items from the iterable to the Collection. |
| private static <K, V> void | |
| public static void | addShutdownHook(Object
the object the method is called on (ignored) self, Closure<V> the shutdown hook action closure)Allows the usage of addShutdownHook without getting the runtime first. |
| public static Number | |
| public static BitSet | |
| public static Boolean | |
| public static boolean | Returns: true if any iteration for the object matches the closure predicatethe object over which we iterate self, Closure<V> the closure predicate used for matching predicate)Iterates over the contents of an object or collection, and checks whether a predicate is valid for at least one element. |
| public static <T> boolean | |
| public static <T> boolean | |
| public static <T> boolean | |
| public static <K, V> boolean | |
| public static boolean | |
| private static Object | |
| public static boolean | |
| public static boolean | |
| public static boolean | Returns: the boolean valuethe collection collection)Coerce a collection instance to a boolean value. |
| public static boolean | |
| public static boolean | |
| public static boolean | Returns: the boolean valuethe enumeration enumeration)Coerce an enumeration instance to a boolean value. |
| public static boolean | |
| public static boolean | Returns: the array's boolean valuean array array)Coerces a byte array to a boolean value. |
| public static boolean | Returns: the array's boolean valuean array array)Coerces a short array to a boolean value. |
| public static boolean | Returns: the array's boolean valuean array array)Coerces an int array to a boolean value. |
| public static boolean | Returns: the array's boolean valuean array array)Coerces a long array to a boolean value. |
| public static boolean | Returns: the array's boolean valuean array array)Coerces a float array to a boolean value. |
| public static boolean | Returns: the array's boolean valuean array array)Coerces a double array to a boolean value. |
| public static boolean | Returns: the array's boolean valuean array array)Coerces a boolean array to a boolean value. |
| public static boolean | Returns: the array's boolean valuean array array)Coerces a char array to a boolean value. |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static <T> Collection | Returns: a newly created List if this Iterable is not already a Collectionan Iterable to be converted into a Collection self)Converts this Iterable to a Collection. |
| public static <K, V> Map | Returns: an unmodifiable view of a copy of the original, i.e. an effectively immutable copya Map self)A convenience method for creating an immutable Map. |
| public static <K, V> SortedMap | Returns: an unmodifiable view of a copy of the original, i.e. an effectively immutable copya SortedMap self)A convenience method for creating an immutable SortedMap. |
| public static <T> List | Returns: an unmodifiable view of a copy of the original, i.e. an effectively immutable copya List self)A convenience method for creating an immutable List. |
| public static <T> Set | Returns: an unmodifiable view of a copy of the original, i.e. an effectively immutable copya Set self)A convenience method for creating an immutable Set. |
| public static <T> SortedSet | Returns: an unmodifiable view of a copy of the original, i.e. an effectively immutable copya SortedSet self)A convenience method for creating an immutable SortedSet. |
| public static <T> Collection | Returns: an unmodifiable view of a copy of the original, i.e. an effectively immutable copya Collection self)A convenience method for creating an immutable Collection. |
| public static <T> List | |
| public static <T> List | |
| public static String | |
| public static <K, V> Map | Returns: a synchronized Mapa Map self)A convenience method for creating a synchronized Map. |
| public static <K, V> SortedMap | Returns: a synchronized SortedMapa SortedMap self)A convenience method for creating a synchronized SortedMap. |
| public static <T> Collection | Returns: a synchronized Collectiona Collection self)A convenience method for creating a synchronized Collection. |
| public static <T> List | Returns: a synchronized Lista List self)A convenience method for creating a synchronized List. |
| public static <T> Set | Returns: a synchronized Seta Set self)A convenience method for creating a synchronized Set. |
| public static <T> SortedSet | Returns: a synchronized SortedSeta SortedSet self)A convenience method for creating a synchronized SortedSet. |
| public static <T> T | |
| public static <T> T | Returns: the object resulting from this type conversiona collection col, Class<T> the desired class clazz)Converts the given collection to another type. |
| public static <T> T | |
| public static <T> T | |
| public static <T> T | |
| public static <T> T | |
| public static <T> T | |
| public static <K, V> Map | Returns: an unmodifiable view of the Mapa Map self)Creates an unmodifiable view of a Map. |
| public static <K, V> SortedMap | Returns: an unmodifiable view of the SortedMapa SortedMap self)Creates an unmodifiable view of a SortedMap. |
| public static <T> List | Returns: an unmodifiable view of the Lista List self)Creates an unmodifiable view of a List. |
| public static <T> Set | Returns: an unmodifiable view of the Seta Set self)Creates an unmodifiable view of a Set. |
| public static <T> SortedSet | Returns: an unmodifiable view of the SortedSeta SortedSet self)Creates an unmodifiable view of a SortedSet. |
| public static <T> Collection | Returns: an unmodifiable view of the Collectiona Collection self)Creates an unmodifiable view of a Collection. |
| public static Object | |
| public static Object | |
| public static Object | |
| public static BigDecimal | Returns: The average of the itemsThe array of values to calculate the average of self)Calculates the average of the bytes in the array. |
| public static BigDecimal | Returns: The average of the itemsThe array of values to calculate the average of self)Calculates the average of the shorts in the array. |
| public static BigDecimal | Returns: The average of the itemsThe array of values to calculate the average of self)Calculates the average of the ints in the array. |
| public static BigDecimal | Returns: The average of the itemsThe array of values to calculate the average of self)Calculates the average of the longs in the array. |
| public static double | Returns: The average of the itemsThe array of values to calculate the average of self)Calculates the average of the floats in the array. |
| public static double | Returns: The average of the itemsThe array of values to calculate the average of self)Calculates the average of the doubles in the array. |
| public static <T> Object | |
| public static <T> Object | |
| public static <T> Object | Returns: The average of the values returned by applying the closure to each item from the Iterator.An Iterator self, Closure<V> a single parameter closure that returns a (typically) numeric value. closure)Averages the result of applying a closure to each item returned from an iterator. |
| public static BitSet | |
| public static Number | |
| public static <T> BufferedIterator | |
| public static <T> BufferedIterator | Returns: a BufferedIterator for traversing selfan iterable object self)Returns a |
| public static <T> BufferedIterator | Returns: a BufferedIterator for traversing selfa list self)Returns a |
| protected static <T> T | |
| protected static <T, K, V> T | |
| protected static <T, K, V> T | |
| public static <T> List | Returns: a list of lists chopping the original array elements into pieces determined by chopSizesan Array to be chopped self, int... the sizes for the returned pieces chopSizes)Chops the array into pieces, returning lists with sizes corresponding to the supplied chop sizes. |
| public static <T> List | |
| public static <T> List | Returns: a list of lists chopping the original iterator elements into pieces determined by chopSizesan Iterator to be chopped self, int... the sizes for the returned pieces chopSizes)Chops the iterator items into pieces, returning lists with sizes corresponding to the supplied chop sizes. |
| private static boolean | |
| private static boolean | |
| public static <T> List | |
| public static <T> List | Returns: a List containing the array values collated into sub-listsan array self, int the length of each sub-list in the returned list size)Collates an array. |
| public static <T> List | |
| public static <T> List | Returns: a List containing the data collated into sub-listsan Iterable self, int the length of each sub-list in the returned list size, int the number of elements to step through for each sub-list step)Collates this iterable into sub-lists of length |
| public static <T> List | Returns: a List containing the array elements collated into sub-listsan array self, int the length of each sub-list in the returned list size, int the number of elements to step through for each sub-list step)Collates an array into sub-lists. |
| public static <T> List | |
| public static <T> List | Returns: a List containing the data collated into sub-listsan Iterable self, int the length of each sub-list in the returned list size, boolean if true, any remaining elements are returned as sub-lists. Otherwise they are discarded keepRemainder)Collates this iterable into sub-lists of length |
| public static <T> List | Returns: a List containing the array elements collated into sub-listsan array self, int the length of each sub-list in the returned list size, boolean if true, any remaining elements are returned as sub-lists. Otherwise they are discarded keepRemainder)Collates this array into sub-lists. |
| public static <T> List | |
| public static <T> List | Returns: a List containing the data collated into sub-listsan Iterable self, int the length of each sub-list in the returned list size, int the number of elements to step through for each sub-list step, boolean if true, any remaining elements are returned as sub-lists. Otherwise they are discarded keepRemainder)Collates this iterable into sub-lists of length |
| public static <T> List | Returns: a List containing the array elements collated into sub-listsan array self, int the length of each sub-list in the returned list size, int the number of elements to step through for each sub-list step, boolean if true, any remaining elements are returned as sub-lists. Otherwise they are discarded keepRemainder)Collates this array into into sub-lists. |
| public static <T> List | |
| public static Collection | Returns: a Collection of the transformed valuesan aggregate Object with an Iterator returning its items self)Iterates through this aggregate Object transforming each item into a new value using Closure.IDENTITY as a transformer, basically returning a list of items copied from the original object. |
| public static <T> List | Returns: a List of the transformed valuesan aggregate Object with an Iterator returning its items self, Closure<T> the closure used to transform each item of the aggregate object transform)Iterates through this aggregate Object transforming each item into a new value using the
|
| public static <T> Collection | Returns: the collector with all transformed values added to itan aggregate Object with an Iterator returning its items self, Collection<T> the Collection to which the transformed values are added collector, Closure<? extends T> the closure used to transform each item of the aggregate object transform)Iterates through this aggregate Object transforming each item into a new value using the |
| public static <S, T> List | |
| public static <S, T> Collection | Returns: the collector with all transformed values added to itan Array self, Collection<T> the Collection to which the transformed values are added collector, Closure<? extends T> the closure used to transform each item transform)Iterates through this Array transforming each item into a new value using the |
| public static <S, T> List | |
| public static <S, T> Collection | Returns: the collector with all transformed values added to itan Iterator self, Collection<T> the Collection to which the transformed values are added collector, Closure<? extends T> the closure used to transform each item transform)Iterates through this Iterator transforming each item into a new value using the |
| public static <T> List | Returns: a List of the transformed valuesa collection self)
Deprecated
use the Iterable version instead
Iterates through this collection transforming each entry into a new value using Closure.IDENTITY
as a transformer, basically returning a list of items copied from the original collection.
|
| public static <S, T> List | Returns: a List of the transformed valuesa collection self, Closure<T> the closure used to transform each item of the collection transform)
Deprecated
use the Iterable version instead
Iterates through this collection transforming each entry into a new value using the transform closure
returning a list of transformed values.
|
| public static <S, T> Collection | Returns: the collector with all transformed values added to ita collection self, Collection<T> the Collection to which the transformed values are added collector, Closure<? extends T> the closure used to transform each item of the collection transform)
Deprecated
use the Iterable version instead
Iterates through this collection transforming each value into a new value using the transform closure
and adding it to the supplied collector.
|
| public static <T> List | |
| public static <S, T> List | |
| public static <S, T> Collection | Returns: the collector with all transformed values added to itan Iterable self, Collection<T> the Collection to which the transformed values are added collector, Closure<? extends T> the closure used to transform each item transform)Iterates through this collection transforming each value into a new value using the |
| public static <T, K, V> Collection | Returns: the collector with all transformed values added to ita Map self, Collection<T> the Collection to which transformed values are added collector, Closure<? extends T> the transformation closure which can take one (Map.Entry) or two (key, value) parameters transform)Iterates through this Map transforming each map entry into a new value using the |
| public static <T, K, V> List | Returns: the resultant list of transformed valuesa Map self, Closure<T> the transformation closure which can take one (Map.Entry) or two (key, value) parameters transform)Iterates through this Map transforming each map entry into a new value using the |
| public static List | collectAll(Collection<E> self, Closure<V> transform)
Deprecated
Use collectNested instead
Deprecated alias for collectNested
|
| public static Collection | collectAll(Collection<E> self, Collection<E> collector, Closure<V> transform)
Deprecated
Use collectNested instead
Deprecated alias for collectNested
|
| public static <K, V, X, Y> Map | Returns: the collector with all transformed values added to ita Map self, Map<K, V> the Map into which the transformed entries are put collector, Closure<?> the closure used for transforming, which can take one (Map.Entry) or two (key, value) parameters and
should return a Map.Entry, a Map or a two-element list containing the resulting key and value transform)Iterates through this Map transforming each map entry using the |
| public static <K, V, X, Y> Map | Returns: a Map of the transformed entriesa Map self, Closure<?> the closure used for transforming, which can take one (Map.Entry) or two (key, value) parameters and
should return a Map.Entry, a Map or a two-element list containing the resulting key and value transform)Iterates through this Map transforming each entry using the |
| public static <K, V> Map | collectEntries(Collection<?> self, Closure<?> transform)
Deprecated
Use the Iterable version of collectEntries instead
|
| public static <K, V, E> Map | Returns: a Map of the transformed entriesan Iterator self, Closure<?> the closure used for transforming, which has an item from self as the parameter and
should return a Map.Entry, a Map or a two-element list containing the resulting key and value transform)A variant of collectEntries for Iterators. |
| public static <K, V, E> Map | Returns: a Map of the transformed entriesan Iterable self, Closure<?> the closure used for transforming, which has an item from self as the parameter and
should return a Map.Entry, a Map or a two-element list containing the resulting key and value transform)Iterates through this Iterable transforming each item using the |
| public static <K, V> Map | |
| public static <K, V> Map | Returns: a Map of the transformed entriesan Iterator self)A variant of collectEntries for Iterators using the identity closure as the transform. |
| public static <K, V> Map | Returns: a Map of the transformed entriesan Iterable self)A variant of collectEntries for Iterable objects using the identity closure as the transform. |
| public static <K, V> Map | collectEntries(Collection<?> self, Map<K, V> collector, Closure<?> transform)
Deprecated
Use the Iterable version of collectEntries instead
|
| public static <K, V, E> Map | Returns: the collector with all transformed values added to itan Iterator self, Map<K, V> the Map into which the transformed entries are put collector, Closure<?> the closure used for transforming, which has an item from self as the parameter and
should return a Map.Entry, a Map or a two-element list containing the resulting key and value transform)A variant of collectEntries for Iterators using a supplied map as the destination of transformed entries. |
| public static <K, V, E> Map | Returns: the collector with all transformed values added to itan Iterable self, Map<K, V> the Map into which the transformed entries are put collector, Closure<?> the closure used for transforming, which has an item from self as the parameter and
should return a Map.Entry, a Map or a two-element list containing the resulting key and value transform)Iterates through this Iterable transforming each item using the closure as a transformer into a map entry, returning the supplied map with all of the transformed entries added to it. |
| public static <K, V> Map | collectEntries(Collection<?> self, Map<K, V> collector)
Deprecated
Use the Iterable version of collectEntries instead
|
| public static <K, V> Map | Returns: the collector with all transformed values added to itan Iterator self, Map<K, V> the Map into which the transformed entries are put collector)A variant of collectEntries for Iterators using the identity closure as the transform and a supplied map as the destination of transformed entries. |
| public static <K, V> Map | Returns: the collector with all transformed values added to itan Iterable self, Map<K, V> the Map into which the transformed entries are put collector)A variant of collectEntries for Iterables using the identity closure as the transform and a supplied map as the destination of transformed entries. |
| public static <K, V, E> Map | Returns: the collector with all transformed values added to itan array self, Map<K, V> the Map into which the transformed entries are put collector, Closure<?> the closure used for transforming, which has an item from self as the parameter and
should return a Map.Entry, a Map or a two-element list containing the resulting key and value transform)Iterates through this array transforming each item using the |
| public static <K, V, E> Map | Returns: the collector with all transformed values added to itan array self, Map<K, V> the Map into which the transformed entries are put collector)A variant of collectEntries using the identity closure as the transform. |
| public static <K, V, E> Map | Returns: a Map of the transformed entriesa Collection self, Closure<?> the closure used for transforming, which has an item from self as the parameter and
should return a Map.Entry, a Map or a two-element list containing the resulting key and value transform)Iterates through this array transforming each item using the |
| public static <K, V, E> Map | Returns: the collector with all transformed values added to itan array self)A variant of collectEntries using the identity closure as the transform. |
| public static <T, E> List | collectMany(Collection<E> self, Closure<? extends Collection<? extends T>> projection)
Deprecated
Use the Iterable version of collectMany instead
|
| public static <T, E> Collection | collectMany(Collection<E> self, Collection<T> collector, Closure<? extends Collection<? extends T>> projection)
Deprecated
Use the Iterable version of collectMany instead
|
| public static <T, E> List | Returns: a list created from the projected collections concatenated (flattened) togetheran Iterable self, Closure<? extends Collection<? extends T>> a projecting Closure returning a collection of items projection)Projects each item from a source Iterable to a collection and concatenates (flattens) the resulting collections into a single list. |
| public static <T, E> Collection | Returns: the collector with the projected collections concatenated (flattened) into itan Iterable self, Collection<T> an initial collection to add the projected items to collector, Closure<? extends Collection<? extends T>> a projecting Closure returning a collection of items projection)Projects each item from a source collection to a result collection and concatenates (flattens) the resulting
collections adding them into the |
| public static <T, K, V> Collection | Returns: the collector with the projected collections concatenated (flattened) to ita map self, Collection<T> an initial collection to add the projected items to collector, Closure<? extends Collection<? extends T>> a projecting Closure returning a collection of items projection)Projects each item from a source map to a result collection and concatenates (flattens) the resulting
collections adding them into the |
| public static <T, K, V> List | Returns: a list created from the projected collections concatenated (flattened) togethera map self, Closure<? extends Collection<? extends T>> a projecting Closure returning a collection of items projection)Projects each item from a source map to a result collection and concatenates (flattens) the resulting collections adding them into a collection. |
| public static <T, E> List | Returns: a list created from the projected collections concatenated (flattened) togetheran array self, Closure<? extends Collection<? extends T>> a projecting Closure returning a collection of items projection)Projects each item from a source array to a collection and concatenates (flattens) the resulting collections into a single list. |
| public static <T, E> Collection | Returns: the collector with the projected collections concatenated (flattened) to itan array self, Collection<T> an initial collection to add the projected items to collector, Closure<? extends Collection<? extends T>> a projecting Closure returning a collection of items projection)Projects each item from a source array to a collection and concatenates (flattens) the resulting collections into a single list. |
| public static <T, E> Collection | Returns: the collector with the projected collections concatenated (flattened) to itan iterator self, Collection<T> an initial collection to add the projected items to collector, Closure<? extends Collection<? extends T>> a projecting Closure returning a collection of items projection)Projects each item from a source iterator to a collection and concatenates (flattens) the resulting collections into a single list. |
| public static <T, E> List | Returns: a list created from the projected collections concatenated (flattened) togetheran iterator self, Closure<? extends Collection<? extends T>> a projecting Closure returning a collection of items projection)Projects each item from a source iterator to a collection and concatenates (flattens) the resulting collections into a single list. |
| public static <T, K, V> Collection | collectMany$$bridge(Map<K, V> self, Closure<? extends Collection<? extends T>> projection)
Deprecated
|
| public static List | Returns: the resultant collectiona collection self, Closure<V> the closure used to transform each item of the collection transform)Recursively iterates through this collection transforming each non-Collection value into a new value using the closure as a transformer. |
| public static List | Returns: the resultant listan Iterable self, Closure<V> the closure used to transform each item of the Iterable transform)Recursively iterates through this Iterable transforming each non-Collection value into a new value using the closure as a transformer. |
| public static Collection | collectNested(Collection<E> self, Collection<E> collector, Closure<V> transform)
Deprecated
Use the Iterable version of collectNested instead
|
| public static Collection | Returns: the collector with all transformed values added to itan Iterable self, Collection<E> an initial Collection to which the transformed values are added collector, Closure<V> the closure used to transform each element of the Iterable transform)Recursively iterates through this Iterable transforming each non-Collection value
into a new value using the |
| public static List | |
| public static List | Returns: a List of the combinations foundan Iterable of collections self)Adds GroovyCollections#combinations(Iterable) as a method on Iterables. |
| public static List | Returns: a List of the results of applying the closure to each combinations founda Collection of lists self, Closure<?> a closure to be called on each combination function)Adds GroovyCollections#combinations(Iterable, Closure) as a method on collections. |
| public static int | |
| public static int | |
| public static int | |
| public static int | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | Returns: true if this collection contains all of the elements in the specified arrayan Iterable to be checked for containment self, Object[] array to be checked for containment in this iterable items)Returns true if this iterable contains all of the elements in the specified array. |
| public static boolean | |
| public static Number | |
| public static <T> Number | |
| public static Number | |
| public static Number | |
| public static Number | |
| public static <T> Number | |
| public static <K, V> Number | |
| public static Number | |
| public static <T> Number | |
| public static Number | |
| public static Number | |
| public static Number | |
| public static Number | |
| public static Number | |
| public static Number | |
| public static Number | |
| public static Number | |
| private static <T> void | |
| public static <K> Map | countBy(Collection<E> self, Closure<K> closure)
Deprecated
Use the Iterable version of countBy instead
|
| public static <K, E> Map | |
| public static <K, E> Map | |
| public static <K, E> Map | |
| public static <K, U, V> Map | Returns: a new Map grouped by keys with frequency countsa map to group and count self, Closure<K> a closure mapping entries to frequency count keys closure)Groups the members of a map into groups determined by the supplied mapping closure and counts the frequency of the created groups. |
| private static void | |
| public static boolean | |
| public static boolean | |
| public static Number | |
| public static Number | |
| public static Number | |
| public static void | |
| public static void | |
| public static void | |
| public static void | |
| public static void | |
| public static void | |
| public static void | |
| public static void | downto(BigInteger
a BigInteger self, Number the end number to, Closure<V> the code to execute for each number closure)Iterates from this number down to the given number, inclusive, decrementing by one each time. |
| public static void | downto(BigDecimal
a BigDecimal self, Number the end number to, Closure<V> the code to execute for each number closure)Iterates from this number down to the given number, inclusive, decrementing by one each time. |
| public static <T> SortedSet | Returns: a SortedSet consisting of all the elements of this Iterable minus the firstnum elements,
or an empty list if it has less then num elements.the original SortedSet self, int the number of elements to drop from this Iterable num)Drops the given number of elements from the head of this List. |
| public static <T> List | |
| public static <T> Collection | Returns: a Collection consisting of all the elements of this Iterable minus the firstnum elements,
or an empty list if it has less then num elements.the original Iterable self, int the number of elements to drop from this Iterable num)Drops the given number of elements from the head of this Iterable. |
| public static <T> T[] | Returns: an array consisting of all elements of this array except the firstnum ones, or else the empty array, if this
array has less than num elements.the original array self, int the number of elements to drop from this array num)Drops the given number of elements from the head of this array if they are available. |
| public static <K, V> Map | Returns: a map consisting of all key/value pairs of this map except the firstnum ones, or else the empty map, if this map has
less than num elements.the original map self, int the number of elements to drop from this map num)Drops the given number of key/value pairs from the head of this map if they are available. |
| public static <T> Iterator | |
| public static <T> SortedSet | Returns: a List consisting of all the elements of this SortedSet minus the lastnum elements,
or an empty SortedSet if it has less then num elements.the original SortedSet self, int the number of elements to drop from this SortedSet num)Drops the given number of elements from the tail of this SortedSet. |
| public static <T> List | |
| public static <T> Collection | Returns: a Collection consisting of all the elements of this Iterable minus the lastnum elements,
or an empty list if it has less then num elements.the original Iterable self, int the number of elements to drop from this Iterable num)Drops the given number of elements from the tail of this Iterable. |
| public static <T> Iterator | Returns: an Iterator consisting of all the elements of this Iterator minus the lastnum elements,
or an empty Iterator if it has less then num elements.the original Iterator self, int the number of elements to drop num)Drops the given number of elements from the tail of this Iterator. |
| public static <T> T[] | Returns: an array consisting of all elements of this array except the lastnum ones, or else the empty array, if this
array has less than num elements.the original array self, int the number of elements to drop from this array num)Drops the given number of elements from the tail of this array if they are available. |
| public static <T> SortedSet | Returns: the shortest suffix of the given SortedSet such that the given closure condition evaluates to true for each element dropped from the front of the SortedSetthe original SortedSet self, Closure<V> the closure that must evaluate to true to continue dropping elements condition)Returns a suffix of this SortedSet where elements are dropped from the front while the given Closure evaluates to true. |
| public static <T> List | Returns: the shortest suffix of the given List such that the given closure condition evaluates to true for each element dropped from the front of the Listthe original list self, Closure<V> the closure that must evaluate to true to continue dropping elements condition)Returns a suffix of this List where elements are dropped from the front while the given Closure evaluates to true. |
| public static <T> Collection | Returns: a Collection containing the shortest suffix of the given Iterable such that the given closure condition evaluates to true for each element dropped from the front of the Iterablean Iterable self, Closure<V> the closure that must evaluate to true to continue dropping elements condition)Returns a suffix of this Iterable where elements are dropped from the front while the given closure evaluates to true. |
| public static <K, V> Map | Returns: the shortest suffix of the given Map such that the given closure condition evaluates to true for each element dropped from the front of the Mapa Map self, Closure<V> a 1 (or 2) arg Closure that must evaluate to true for the
entry (or key and value) to continue dropping elements condition)Create a suffix of the given Map by dropping as many entries as possible from the front of the original Map such that calling the given closure condition evaluates to true when passed each of the dropped entries (or key/value pairs). |
| public static <T> T[] | Returns: the shortest suffix of the given array such that the given closure condition evaluates to true for each element dropped from the front of the arraythe original array self, Closure<?> the closure that must evaluate to true to
continue dropping elements condition)Create a suffix of the given array by dropping as many elements as possible from the front of the original array such that calling the given closure condition evaluates to true when passed each of the dropped elements. |
| public static <T> Iterator | Returns: the shortest suffix of elements from the given Iterator such that the given closure condition evaluates to true for each element dropped from the front of the Iteratorthe Iterator self, Closure<?> the closure that must evaluate to true to continue dropping elements condition)Creates an Iterator that returns a suffix of the elements from an original Iterator. |
| public static String | |
| public static <T> T[] | |
| public static <T> T | |
| public static <T> Iterable | |
| public static <T> Iterator | |
| public static <T> Collection | Returns: the self Collectionthe Collection over which we iterate self, Closure<V> the closure applied on each element found closure)Iterates through a Collection, passing each item to the given closure. |
| public static <T> List | |
| public static <T> Set | |
| public static <T> SortedSet | |
| public static <K, V> Map | |
| public static void | |
| public static void | |
| public static void | eachCombination(Iterable<T>
a Collection of lists self, Closure<?> a closure to be called on each combination function)Applies a function on each combination of the input lists. |
| public static <T> Iterator | eachPermutation(Collection<T> self, Closure<V> closure)
Deprecated
Use the Iterable version of eachPermutation instead
|
| public static <T> Iterator | Returns: the permutations from the listthe Collection of items self, Closure<V> the closure to call for each permutation closure)Iterates over all permutations of a collection, running a closure for each iteration. |
| public static <T> T[] | Returns: the self arrayan array self, Closure<V> a Closure to operate on each array entry closure)Iterates through an array, passing each array element and the element's index (a counter starting at zero) to the given closure. |
| public static <T> T | Returns: the self Objectan Object self, Closure<V> a Closure to operate on each item closure)Iterates through an aggregate type or data structure, passing each item and the item's index (a counter starting at zero) to the given closure. |
| public static <T> Iterable | Returns: the self Iterablean Iterable self, Closure<V> a Closure to operate on each item closure)Iterates through an iterable type, passing each item and the item's index (a counter starting at zero) to the given closure. |
| public static <T> Iterator | Returns: the self Iterator (now exhausted)an Iterator self, Closure<V> a Closure to operate on each item closure)Iterates through an iterator type, passing each item and the item's index (a counter starting at zero) to the given closure. |
| public static <T> Collection | Returns: the self Collectiona Collection self, Closure<V> a Closure to operate on each item closure)Iterates through a Collection, passing each item and the item's index (a counter starting at zero) to the given closure. |
| public static <T> List | Returns: the self Lista List self, Closure<V> a Closure to operate on each item closure)Iterates through a List, passing each item and the item's index (a counter starting at zero) to the given closure. |
| public static <T> Set | Returns: the self Seta Set self, Closure<V> a Closure to operate on each item closure)Iterates through a Set, passing each item and the item's index (a counter starting at zero) to the given closure. |
| public static <T> SortedSet | Returns: the self SortedSeta SortedSet self, Closure<V> a Closure to operate on each item closure)Iterates through a SortedSet, passing each item and the item's index (a counter starting at zero) to the given closure. |
| public static <K, V> Map | Returns: the self Objectthe map over which we iterate self, Closure<V> a 2 or 3 arg Closure to operate on each item closure)Allows a Map to be iterated through using a closure. |
| public static boolean | Returns: true if the contents of both arrays are equal.an int array left, int[] the array being compared right)Compare the contents of this array to the contents of the given array. |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static <T> boolean | |
| public static boolean | |
| public static boolean | equalsIgnoreZeroSign(Float number, Object other)
Compares this object against the specified object returning the same result
as |
| public static boolean | equalsIgnoreZeroSign(Double number, Object other)
Compares this object against the specified object returning the same result
as |
| public static boolean | Returns: true if every iteration of the object matches the closure predicatethe object over which we iterate self, Closure<V> the closure predicate used for matching predicate)Used to determine if the given predicate closure is valid (i.e. returns
|
| public static <T> boolean | Returns: true if every iteration of the object matches the closure predicatethe iterator over which we iterate self, Closure<V> the closure predicate used for matching predicate)Used to determine if the given predicate closure is valid (i.e. returns
|
| public static <T> boolean | |
| public static <T> boolean | Returns: true if every iteration of the object matches the closure predicatethe iterable over which we iterate self, Closure<V> the closure predicate used for matching predicate)Used to determine if the given predicate closure is valid (i.e. returns
|
| public static <K, V> boolean | |
| public static boolean | |
| public static Object | |
| public static Object | |
| public static <T> T | Returns: the first Object found, in the order of the collections iterator, or null if no element matchesa Collection self, Closure<V> a closure condition closure)Finds the first value matching the closure condition. |
| public static <T> T | |
| public static <T> T | Returns: the first Object found or null if none was founda Collection self)Finds the first item matching the IDENTITY Closure (i.e. matching Groovy truth). |
| public static <K, V> Map. | |
| public static <T> Set | |
| public static <T> List | |
| public static <T> Collection | Returns: a Collection of matching valuesa Collection self, Closure<V> a closure condition closure)Finds all values matching the closure condition. |
| public static <T> Collection | |
| public static <T> Set | |
| public static <T> List | |
| public static <T> Collection | Returns: a Collection of the values founda Collection self)Finds the items matching the IDENTITY Closure (i.e. matching Groovy truth). |
| public static <T> Collection | Returns: a collection of the elements foundan array self)Finds the elements of the array matching the IDENTITY Closure (i.e. matching Groovy truth). |
| public static Collection | |
| public static Collection | |
| private static <T> Collection | |
| public static <K, V> Map | |
| public static int | Returns: an integer that is the index of the first matched object or -1 if no match was foundthe iteration object over which to iterate self, Closure<V> the matching condition condition)Iterates over the elements of an aggregate of items and returns the index of the first item that matches the condition specified in the closure. |
| public static int | Returns: an integer that is the index of the first matched object or -1 if no match was foundthe iteration object over which to iterate self, int start matching from this index startIndex, Closure<V> the matching condition condition)Iterates over the elements of an aggregate of items, starting from a specified startIndex, and returns the index of the first item that matches the condition specified in the closure. |
| public static <T> int | Returns: an integer that is the index of the first matched object or -1 if no match was foundan Iterator self, Closure<V> the matching condition condition)Iterates over the elements of an Iterator and returns the index of the first item that satisfies the condition specified by the closure. |
| public static <T> int | Returns: an integer that is the index of the first matched object or -1 if no match was foundan Iterator self, int start matching from this index startIndex, Closure<V> the matching condition condition)Iterates over the elements of an Iterator, starting from a specified startIndex, and returns the index of the first item that satisfies the condition specified by the closure. |
| public static <T> int | Returns: an integer that is the index of the first matched object or -1 if no match was foundan Iterable self, Closure<V> the matching condition condition)Iterates over the elements of an Iterable and returns the index of the first item that satisfies the condition specified by the closure. |
| public static <T> int | Returns: an integer that is the index of the first matched object or -1 if no match was foundan Iterable self, int start matching from this index startIndex, Closure<V> the matching condition condition)Iterates over the elements of an Iterable, starting from a specified startIndex, and returns the index of the first item that satisfies the condition specified by the closure. |
| public static <T> int | Returns: an integer that is the index of the first matched object or -1 if no match was foundan Array self, Closure<V> the matching condition condition)Iterates over the elements of an Array and returns the index of the first item that satisfies the condition specified by the closure. |
| public static <T> int | Returns: an integer that is the index of the first matched object or -1 if no match was foundan Array self, int start matching from this index startIndex, Closure<V> the matching condition condition)Iterates over the elements of an Array, starting from a specified startIndex, and returns the index of the first item that satisfies the condition specified by the closure. |
| public static List | Returns: a list of numbers corresponding to the index values of all matched objectsthe iteration object over which to iterate self, Closure<V> the matching condition condition)Iterates over the elements of an aggregate of items and returns the index values of the items that match the condition specified in the closure. |
| public static List | Returns: a list of numbers corresponding to the index values of all matched objectsthe iteration object over which to iterate self, Number start matching from this index startIndex, Closure<V> the matching condition condition)Iterates over the elements of an aggregate of items, starting from a specified startIndex, and returns the index values of the items that match the condition specified in the closure. |
| public static <T> List | Returns: a list of numbers corresponding to the index values of all matched objectsan Iterator self, Closure<V> the matching condition condition)Iterates over the elements of an Iterator and returns the index values of the items that match the condition specified in the closure. |
| public static <T> List | Returns: a list of numbers corresponding to the index values of all matched objectsan Iterator self, Number start matching from this index startIndex, Closure<V> the matching condition condition)Iterates over the elements of an Iterator, starting from a specified startIndex, and returns the index values of the items that match the condition specified in the closure. |
| public static <T> List | Returns: a list of numbers corresponding to the index values of all matched objectsan Iterable self, Closure<V> the matching condition condition)Iterates over the elements of an Iterable and returns the index values of the items that match the condition specified in the closure. |
| public static <T> List | Returns: a list of numbers corresponding to the index values of all matched objectsan Iterable self, Number start matching from this index startIndex, Closure<V> the matching condition condition)Iterates over the elements of an Iterable, starting from a specified startIndex, and returns the index values of the items that match the condition specified in the closure. |
| public static <T> List | Returns: a list of numbers corresponding to the index values of all matched objectsan Array self, Closure<V> the matching condition condition)Iterates over the elements of an Array and returns the index values of the items that match the condition specified in the closure. |
| public static <T> List | Returns: a list of numbers corresponding to the index values of all matched objectsan Array self, Number start matching from this index startIndex, Closure<V> the matching condition condition)Iterates over the elements of an Array, starting from a specified startIndex, and returns the index values of the items that match the condition specified in the closure. |
| public static int | Returns: an integer that is the index of the last matched object or -1 if no match was foundthe iteration object over which to iterate self, Closure<V> the matching condition condition)Iterates over the elements of an aggregate of items and returns the index of the last item that matches the condition specified in the closure. |
| public static int | Returns: an integer that is the index of the last matched object or -1 if no match was foundthe iteration object over which to iterate self, int start matching from this index startIndex, Closure<V> the matching condition condition)Iterates over the elements of an aggregate of items, starting from a specified startIndex, and returns the index of the last item that matches the condition specified in the closure. |
| public static <T> int | Returns: an integer that is the index of the last matched object or -1 if no match was foundan Iterator self, Closure<V> the matching condition condition)Iterates over the elements of an Iterator and returns the index of the last item that matches the condition specified in the closure. |
| public static <T> int | Returns: an integer that is the index of the last matched object or -1 if no match was foundan Iterator self, int start matching from this index startIndex, Closure<V> the matching condition condition)Iterates over the elements of an Iterator, starting from a specified startIndex, and returns the index of the last item that matches the condition specified in the closure. |
| public static <T> int | Returns: an integer that is the index of the last matched object or -1 if no match was foundan Iterable self, Closure<V> the matching condition condition)Iterates over the elements of an Iterable and returns the index of the last item that matches the condition specified in the closure. |
| public static <T> int | Returns: an integer that is the index of the last matched object or -1 if no match was foundan Iterable self, int start matching from this index startIndex, Closure<V> the matching condition condition)Iterates over the elements of an Iterable, starting from a specified startIndex, and returns the index of the last item that matches the condition specified in the closure. |
| public static <T> int | Returns: an integer that is the index of the last matched object or -1 if no match was foundan Array self, Closure<V> the matching condition condition)Iterates over the elements of an Array and returns the index of the last item that matches the condition specified in the closure. |
| public static <T> int | Returns: an integer that is the index of the last matched object or -1 if no match was foundan Array self, int start matching from this index startIndex, Closure<V> the matching condition condition)Iterates over the elements of an Array, starting from a specified startIndex, and returns the index of the last item that matches the condition specified in the closure. |
| public static Object | Returns: the first non-null result of the closurean Object with an iterator returning its values self, Closure<V> a closure that returns a non-null value to indicate that processing should stop and the value should be returned condition)Treats the object as iterable, iterating through the values it represents and returns the first non-null result obtained from calling the closure, otherwise returns null. |
| public static Object | Returns: the first non-null result of the closure, otherwise the default valuean Object with an iterator returning its values self, Object an Object that should be returned if all closure results are null defaultResult, Closure<V> a closure that returns a non-null value to indicate that processing should stop and the value should be returned condition)Treats the object as iterable, iterating through the values it represents and returns the first non-null result obtained from calling the closure, otherwise returns the defaultResult. |
| public static <S, T, U extends T, V extends T> T | Returns: the first non-null result from calling the closure, or the defaultValuea Collection self, U an Object that should be returned if all closure results are null defaultResult, Closure<V> a closure that returns a non-null value to indicate that processing should stop and the value should be returned condition)
Deprecated
use the Iterable version instead
Iterates through the collection calling the given closure for each item but stopping once the first non-null
result is found and returning that result.
|
| public static <S, T> T | Returns: the first non-null result from calling the closure, or nulla Collection self, Closure<T> a closure that returns a non-null value to indicate that processing should stop and the value should be returned condition)
Deprecated
use the Iterable version instead
Iterates through the collection calling the given closure for each item but stopping once the first non-null
result is found and returning that result.
|
| public static <S, T, U extends T, V extends T> T | Returns: the first non-null result from calling the closure, or the defaultValuean Iterator self, U an Object that should be returned if all closure results are null defaultResult, Closure<V> a closure that returns a non-null value to indicate that processing should stop and the value should be returned condition)Iterates through the Iterator calling the given closure condition for each item but stopping once the first non-null result is found and returning that result. |
| public static <T, U> T | Returns: the first non-null result from calling the closure, or nullan Iterator self, Closure<T> a closure that returns a non-null value to indicate that processing should stop and the value should be returned condition)Iterates through the Iterator calling the given closure condition for each item but stopping once the first non-null result is found and returning that result. |
| public static <S, T, U extends T, V extends T> T | Returns: the first non-null result from calling the closure, or the defaultValuean Iterable self, U an Object that should be returned if all closure results are null defaultResult, Closure<V> a closure that returns a non-null value to indicate that processing should stop and the value should be returned condition)Iterates through the Iterable calling the given closure condition for each item but stopping once the first non-null result is found and returning that result. |
| public static <T, U> T | Returns: the first non-null result from calling the closure, or nullan Iterable self, Closure<T> a closure that returns a non-null value to indicate that processing should stop and the value should be returned condition)Iterates through the Iterable calling the given closure condition for each item but stopping once the first non-null result is found and returning that result. |
| public static <S, T, U extends T, V extends T> T | Returns: the first non-null result from calling the closure, or the defaultValuean Array self, U an Object that should be returned if all closure results are null defaultResult, Closure<V> a closure that returns a non-null value to indicate that processing should stop and the value should be returned condition)Iterates through the Array calling the given closure condition for each item but stopping once the first non-null result is found and returning that result. |
| public static <S, T> T | Returns: the first non-null result from calling the closure, or nullan Array self, Closure<T> a closure that returns a non-null value to indicate that processing should stop and the value should be returned condition)Iterates through the Array calling the given closure condition for each item but stopping once the first non-null result is found and returning that result. |
| public static <T, K, V> T | Returns: the first non-null result collected by calling the closure, or null if no such result was founda Map self, Closure<T> a 1 or 2 arg Closure that returns a non-null value when processing should stop and a value should be returned condition)Returns the first non-null closure result found by passing each map entry to the closure, otherwise null is returned. |
| public static <T, U extends T, V extends T, A, B> T | Returns: the first non-null result collected by calling the closure, or the defaultResult if no such result was founda Map self, U an Object that should be returned if all closure results are null defaultResult, Closure<V> a 1 or 2 arg Closure that returns a non-null value when processing should stop and a value should be returned condition)Returns the first non-null closure result found by passing each map entry to the closure, otherwise the defaultResult is returned. |
| public static <T, U> Collection | findResults(Collection<U> self, Closure<T> filteringTransform)
Deprecated
Use the Iterable version of findResults instead
|
| public static <T, U> Collection | Returns: the list of non-null transformed valuesan Iterable self, Closure<T> a Closure that should return either a non-null transformed value or null for items which should be discarded filteringTransform)Iterates through the Iterable transforming items using the supplied closure and collecting any non-null results. |
| public static <T, U> Collection | Returns: the list of non-null transformed valuesan Iterator self, Closure<T> a Closure that should return either a non-null transformed value or null for items which should be discarded filteringTransform)Iterates through the Iterator transforming items using the supplied closure and collecting any non-null results. |
| public static <T, U> Collection | Returns: the list of non-null transformed valuesan Array self, Closure<T> a Closure that should return either a non-null transformed value or null for items which should be discarded filteringTransform)Iterates through the Array transforming items using the supplied closure and collecting any non-null results. |
| public static <T, K, V> Collection | Returns: the list of non-null transformed valuesa Map self, Closure<T> a 1 or 2 arg Closure that should return either a non-null transformed value or null for items which should be discarded filteringTransform)Iterates through the map transforming items using the supplied closure and collecting any non-null results. |
| public static <T> T | |
| public static <T> T | |
| public static <T> T | |
| public static Collection | Returns: a flattened Collectiona Collection to flatten self)Flatten a Collection. |
| public static Collection | |
| public static List | |
| public static Set | |
| public static SortedSet | |
| public static Collection | |
| public static Collection | |
| public static Collection | |
| public static Collection | |
| public static Collection | |
| public static Collection | |
| public static Collection | |
| public static Collection | |
| public static Collection | |
| private static Collection | |
| public static <T> Collection | flatten(Collection<T> self, Closure<? extends T> flattenUsing)
Deprecated
Use the Iterable version of flatten instead
|
| public static <T> Collection | |
| private static <T> Collection | |
| public static <K, V> V | Returns: the value of the given key or the default value, added to the map if the key did not exista Map map, K the key to lookup the value of key, V the value to return and add to the map for this key if
there is no entry for the given key defaultValue)Looks up an item in a Map for the given key and returns the value - unless there is no entry for the given key in which case add the default value to the map and return that. |
| public static Object | |
| public static <T> List | Returns: a new list instance based on range bordersa List self, Range<T extends Comparable<T>> a Range indicating the items to get range)Support the range subscript operator for a List. |
| public static <T> List | Returns: a new eager or lazy list of the values at the given indicesa ListWithDefault self, Collection<E> a Collection of indices indices)Select a List of items from an eager or lazy List using a Collection to identify the indices to be selected. |
| public static <T> List | Returns: a new eager or lazy list instance based on range bordersa ListWithDefault self, Range<T extends Comparable<T>> a Range indicating the items to get range)Support the range subscript operator for an eager or lazy List. |
| public static <T> List | Returns: a new list instance based on range bordersa ListWithDefault self, EmptyRange<T extends Comparable<T>> a Range indicating the items to get range)Support the range subscript operator for an eager or lazy List. |
| public static <T> List | Returns: a new list instance based on range bordersa List self, EmptyRange<T extends Comparable<T>> a Range indicating the items to get range)Support the range subscript operator for a List. |
| public static <T> List | Returns: a new list of the values at the given indicesa List self, Collection<E> a Collection of indices indices)Select a List of items from a List using a Collection to identify the indices to be selected. |
| public static <T> List | Returns: a new list of the values at the given indicesan array self, Collection<E> a Collection of indices indices)Select a List of items from an array using a Collection to identify the indices to be selected. |
| public static <T> List | Returns: a range of a list from the range's from index up to but not including the range's to valuean Array of Objects array, Range<T extends Comparable<T>> a Range range)Support the range subscript operator for an Array |
| public static <T> List | |
| public static <T> List | Returns: an empty Rangean Array of Objects array, EmptyRange<T extends Comparable<T>> an EmptyRange range)
|
| public static <T> List | Returns: a range of a list from the range's from index up to but not including the range's to valuean Array of Objects array, ObjectRange an ObjectRange range)
|
| public static <T> T | |
| public static <T> T | |
| public static <T> T | |
| public static <T> T | |
| public static <K, V> V | |
| public static List | Returns: a Lista Collection coll, String a String property)Support the subscript operator for Collection. |
| public static List | Returns: list of the retrieved bytesa byte array array, Range<T extends Comparable<T>> a range indicating the indices for the items to retrieve range)Support the subscript operator with a range for a byte array |
| public static List | Returns: list of the retrieved charsa char array array, Range<T extends Comparable<T>> a range indicating the indices for the items to retrieve range)Support the subscript operator with a range for a char array |
| public static List | Returns: list of the retrieved shortsa short array array, Range<T extends Comparable<T>> a range indicating the indices for the items to retrieve range)Support the subscript operator with a range for a short array |
| public static List | Returns: list of the ints at the given indicesan int array array, Range<T extends Comparable<T>> a range indicating the indices for the items to retrieve range)Support the subscript operator with a range for an int array |
| public static List | Returns: list of the retrieved longsa long array array, Range<T extends Comparable<T>> a range indicating the indices for the items to retrieve range)Support the subscript operator with a range for a long array |
| public static List | Returns: list of the retrieved floatsa float array array, Range<T extends Comparable<T>> a range indicating the indices for the items to retrieve range)Support the subscript operator with a range for a float array |
| public static List | Returns: list of the retrieved doublesa double array array, Range<T extends Comparable<T>> a range indicating the indices for the items to retrieve range)Support the subscript operator with a range for a double array |
| public static List | Returns: list of the retrieved booleansa boolean array array, Range<T extends Comparable<T>> a range indicating the indices for the items to retrieve range)Support the subscript operator with a range for a boolean array |
| public static List | |
| public static List | |
| public static List | |
| public static List | |
| public static List | |
| public static List | |
| public static List | |
| public static List | |
| public static List | Returns: list of the retrieved bytesa byte array array, ObjectRange an ObjectRange indicating the indices for the items to retrieve range)Support the subscript operator with an ObjectRange for a byte array |
| public static List | Returns: list of the retrieved charsa char array array, ObjectRange an ObjectRange indicating the indices for the items to retrieve range)Support the subscript operator with an ObjectRange for a char array |
| public static List | Returns: list of the retrieved shortsa short array array, ObjectRange an ObjectRange indicating the indices for the items to retrieve range)Support the subscript operator with an ObjectRange for a short array |
| public static List | Returns: list of the retrieved intsan int array array, ObjectRange an ObjectRange indicating the indices for the items to retrieve range)Support the subscript operator with an ObjectRange for an int array |
| public static List | Returns: list of the retrieved longsa long array array, ObjectRange an ObjectRange indicating the indices for the items to retrieve range)Support the subscript operator with an ObjectRange for a long array |
| public static List | Returns: list of the retrieved floatsa float array array, ObjectRange an ObjectRange indicating the indices for the items to retrieve range)Support the subscript operator with an ObjectRange for a float array |
| public static List | Returns: list of the retrieved doublesa double array array, ObjectRange an ObjectRange indicating the indices for the items to retrieve range)Support the subscript operator with an ObjectRange for a double array |
| public static List | Returns: list of the retrieved bytesa byte array array, ObjectRange an ObjectRange indicating the indices for the items to retrieve range)Support the subscript operator with an ObjectRange for a byte array |
| public static List | Returns: list of the bytes at the given indicesa byte array array, Collection<E> a collection of indices for the items to retrieve indices)Support the subscript operator with a collection for a byte array |
| public static List | Returns: list of the chars at the given indicesa char array array, Collection<E> a collection of indices for the items to retrieve indices)Support the subscript operator with a collection for a char array |
| public static List | Returns: list of the shorts at the given indicesa short array array, Collection<E> a collection of indices for the items to retrieve indices)Support the subscript operator with a collection for a short array |
| public static List | Returns: list of the ints at the given indicesan int array array, Collection<E> a collection of indices for the items to retrieve indices)Support the subscript operator with a collection for an int array |
| public static List | Returns: list of the longs at the given indicesa long array array, Collection<E> a collection of indices for the items to retrieve indices)Support the subscript operator with a collection for a long array |
| public static List | Returns: list of the floats at the given indicesa float array array, Collection<E> a collection of indices for the items to retrieve indices)Support the subscript operator with a collection for a float array |
| public static List | Returns: list of the doubles at the given indicesa double array array, Collection<E> a collection of indices for the items to retrieve indices)Support the subscript operator with a collection for a double array |
| public static List | Returns: list of the booleans at the given indicesa boolean array array, Collection<E> a collection of indices for the items to retrieve indices)Support the subscript operator with a collection for a boolean array |
| public static boolean | |
| public static BitSet | |
| private static <T> T | |
| private static List | |
| private static Object | |
| public static Groovydoc | Returns: runtime groovydocthe groovydoc hold holder)Get runtime groovydoc |
| public static IntRange | |
| public static <T> IntRange | |
| public static IntRange | |
| public static IntRange | |
| public static IntRange | |
| public static IntRange | |
| public static IntRange | |
| public static IntRange | |
| public static IntRange | |
| public static IntRange | |
| public static URL | Returns: the url of the jar,null if the specified class is from JDKthe class self)Gets the url of the jar file/source file containing the specified class |
| public static MetaClass | Returns: An MetaClass instanceThe java.lang.Class instance c)Adds a "metaClass" property to all class objects so you can use the syntax
|
| public static MetaClass | Returns: The MetaClassThe object in question obj)Obtains a MetaClass for an object either from the registry or in the case of a GroovyObject from the object itself. |
| public static MetaClass | Returns: The MetaClassThe object in question obj)Obtains a MetaClass for an object either from the registry or in the case of a GroovyObject from the object itself. |
| public static List | Returns: list ofgroovy. objectsthe receiver object self)Retrieves the list of |
| public static Map | Returns: meta properties as Map of key/value pairsthe receiver object self)Convenience method that calls |
| public static ClassLoader | Returns: the rootLoader for the ClassLoadera ClassLoader self)Iterates through the classloader parents until it finds a loader with a class named "org.codehaus.groovy.tools.RootLoader". |
| protected static List | |
| public static Collection | Returns: a collection of objects which match the filterthe object over which we iterate self, Object the filter to perform on the object (using the filter)isCase(java. method)Iterates over the collection of items which this Object represents and returns each item that matches
the given filter - calling the |
| public static <T> Collection | Returns: a collection of objects which match the filtera collection self, Object the filter to perform on each element of the collection (using the filter)isCase(java. method)Iterates over the collection of items and returns each item that matches
the given filter - calling the |
| public static <T> List | Returns: a List of objects which match the filtera List self, Object the filter to perform on each element of the collection (using the filter)isCase(java. method)Iterates over the collection of items and returns each item that matches
the given filter - calling the |
| public static <T> Set | Returns: a Set of objects which match the filtera Set self, Object the filter to perform on each element of the collection (using the filter)isCase(java. method)Iterates over the collection of items and returns each item that matches
the given filter - calling the |
| public static <T> Collection | Returns: a collection of objects which match the filteran array self, Object the filter to perform on each element of the array (using the filter)isCase(java. method)Iterates over the array of items and returns a collection of items that match
the given filter - calling the |
| public static Collection | Returns: a collection of objects which match the filterthe object over which we iterate self)Iterates over the collection of items which this Object represents and returns each item that matches using the IDENTITY Closure as a filter - effectively returning all elements which satisfy Groovy truth. |
| public static <T> Collection | Returns: a collection of elements satisfy Groovy trutha Collection self)Iterates over the collection returning each element that matches using the IDENTITY Closure as a filter - effectively returning all elements which satisfy Groovy truth. |
| public static <T> List | |
| public static <T> Set | |
| public static <T> Collection | Returns: a collection of elements which satisfy Groovy truthan array self)Iterates over the array returning each element that matches using the IDENTITY Closure as a filter - effectively returning all elements which satisfy Groovy truth. |
| protected static <K, T> void | groupAnswer(final Map<K, List<T>>
the map containing the results answer, T the element to be placed element, K the value according to which the element will be placed value)Groups the current element according to the value |
| public static <K, T> Map | groupBy(Collection<T> self, Closure<K> closure)
Deprecated
Use the Iterable version of groupBy instead
|
| public static <K, T> Map | |
| public static <K, T> Map | |
| public static Map | groupBy(Collection<E> self, Object... closures)
Deprecated
Use the Iterable version of groupBy instead
|
| public static Map | |
| public static Map | |
| public static Map | groupBy(Collection<E> self, List<Closure<V>> closures)
Deprecated
Use the Iterable version of groupBy instead
|
| public static Map | |
| public static Map | |
| public static <G, K, V> Map | |
| public static Map | |
| public static Map | |
| public static <G, K, V> Map | Returns: a new Map grouped by keysa map to group self, Closure<G> a 1 or 2 arg Closure mapping entries on keys closure)Groups all map entries into groups determined by the supplied mapping closure. |
| private static MetaClass | |
| public static MetaProperty | Returns: The found MetaProperty or null if it doesn't existThe object to inspect self, String The name of the property of interest name)Returns true of the implementing MetaClass has a property of the given name Note that this method will only return true for realised properties and does not take into account implementation of getProperty or propertyMissing |
| public static <T> T | |
| public static <T> T | |
| public static <T> T | Returns: the first item from the Object arrayan array self)Returns the first item from the Object array. |
| public static <T, U> T | |
| public static Boolean | |
| public static <E> Map | |
| public static <E> Map | |
| public static Map | |
| public static Map | Returns: a Map (since the keys/indices are unique) containing the elements from the iterable zipped with indicesan Iterable self, int an index to start from offset)Zips an int[] with indices in (index, value) order. |
| public static Map | |
| public static Map | Returns: a Map (since the keys/indices are unique) containing the elements from the iterable zipped with indicesa long[] self, int an index to start from offset)Zips a long[] with indices in (index, value) order. |
| public static Map | |
| public static Map | Returns: a Map (since the keys/indices are unique) containing the elements from the iterable zipped with indicesa double[] self, int an index to start from offset)Zips a double[] with indices in (index, value) order. |
| public static <E> Iterator | |
| public static <E> Iterator | |
| public static <T> Collection | |
| public static <T> List | |
| public static <T> SortedSet | |
| public static <T> Iterator | |
| public static <T> T[] | Returns: an array without its last elementan array self)Returns the items from the Object array excluding the last item. |
| public static <T> List | Returns: a List of the init values from the given Iterablean Iterable self)Calculates the init values of this Iterable: the first value will be this list of all items from the iterable and the final one will be an empty list, with the intervening values the results of successive applications of init on the items. |
| public static <T, V extends T> T | Returns: the result of the last closure calla Collection self, Closure<V> a closure closure)Performs the same function as the version of inject that takes an initial value, but uses the head of the Collection as the initial value, and iterates over the tail. |
| public static <E, T, U extends T, V extends T> T | Returns: the result of the last closure calla Collection self, U some initial value initialValue, Closure<V> a closure closure)Iterates through the given Collection, passing in the initial value to the 2-arg closure along with the first item. |
| public static <K, V, T, U extends T, W extends T> T | Returns: the result of the last closure calla Map self, U some initial value initialValue, Closure<W> a 2 or 3 arg Closure closure)Iterates through the given Map, passing in the initial value to the 2-arg Closure along with the first item (or 3-arg Closure along with the first key and value). |
| public static <E, T, U extends T, V extends T> T | |
| public static <T, V extends T> T | |
| public static <T, U extends T, V extends T> T | |
| public static <E, T, V extends T> T | |
| public static <E, T, U extends T, V extends T> T | |
| public static String | |
| public static Number | |
| public static Number | |
| public static Number | |
| public static Number | |
| public static <T> Collection | Returns: a Collection as an intersection of both collectionsa Collection left, Collection<T> a Collection right)Create a Collection composed of the intersection of both collections. |
| public static <T> Collection | Returns: a Collection as an intersection of both collectionsa Collection left, Collection<T> a Collection right, Comparator<T> a Comparator comparator)Create a Collection composed of the intersection of both collections. |
| public static <T> Collection | |
| public static <T> Collection | Returns: a Collection as an intersection of both iterablesan Iterable left, Iterable<T> an Iterable right, Comparator<T> a Comparator comparator)Create a Collection composed of the intersection of both iterables. |
| public static <T> List | |
| public static <T> List | Returns: a List as an intersection of a List and an Iterablea List left, Iterable<T> an Iterable right, Comparator<T> a Comparator comparator)Create a List composed of the intersection of a List and an Iterable. |
| public static <T> Set | |
| public static <T> Set | Returns: a Set as an intersection of a Set and an Iterablea Set left, Iterable<T> an Iterable right, Comparator<T> a Comparator comparator)Create a Set composed of the intersection of a Set and an Iterable. |
| public static <T> SortedSet | |
| public static <T> SortedSet | Returns: a Set as an intersection of a SortedSet and an Iterablea SortedSet left, Iterable<T> an Iterable right, Comparator<T> a Comparator comparator)Create a SortedSet composed of the intersection of a SortedSet and an Iterable. |
| public static <K, V> Map | |
| private static Object | |
| public static Object | Returns: the result of the method callany Object object, String the name of the method to call method, Object the arguments to use arguments)Provide a dynamic method invocation method which can be overloaded in classes to implement dynamic proxies easily. |
| public static boolean | |
| public static Boolean | Returns: true if left is equal to or bigger than righta BigDecimal left, BigDecimal a BigDecimal right)Compare a BigDecimal to another. |
| public static Boolean | Returns: true if left is equal to or bigger than the value represented by righta BigDecimal left, String a String representing a number right)Compare a BigDecimal to a String representing a number. |
| public static boolean | |
| public static boolean | |
| public static boolean | Returns: true if the caseValue is deemed to contain the switchValuethe case value caseValue, Object the switch value switchValue)'Case' implementation for collections which tests if the 'switch' operand is contained in any of the 'case' values. |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | Returns: true if the iterable has no elements, false otherwisean Iterable self)Check whether an
def items = [1]
def iterable = { [ hasNext:{ !items.isEmpty() }, next:{ items.pop() } ] as Iterator } as Iterable
assert !iterable.isEmpty()
iterable.iterator().next()
assert iterable.isEmpty()
|
| public static boolean | |
| public static boolean | Returns: true if the character is a letter or digita Character self)Determines if a character is a letter or digit. |
| public static boolean | Returns: true if the character is lowercasea Character self)Determine if a Character is lowercase. |
| private static boolean | |
| public static boolean | Returns: true if the character is uppercasea Character self)Determine if a Character is uppercase. |
| public static boolean | Returns: true if the character is a whitespace charactera Character self)Determines if a character is a whitespace character. |
| public static <T> Iterator | Returns: an Iterator for the given Array.an array a)Attempts to create an Iterator for the given object by first converting it to a Collection. |
| public static Iterator | |
| public static <T> Iterator | Returns: an Iterator for the given Enumerationan Enumeration object enumeration)Allows an Enumeration to behave like an Iterator. |
| public static <T> Iterator | |
| public static String | |
| public static String | |
| public static String | |
| public static <T> String | |
| public static String | |
| public static String | |
| public static String | |
| public static String | |
| public static String | |
| public static String | |
| public static String | |
| public static String | |
| public static <T> T | |
| public static <T> T | |
| public static <T> T | |
| public static <T> T | |
| public static <T> Collection | Returns: same collection, after the value was added to it.a Collection self, T an Object to be added to the collection. value)Overloads the left shift operator to provide an easy way to append objects to a Collection. |
| public static <T> List | |
| public static <T> Set | |
| public static <T> SortedSet | |
| public static <T> BlockingQueue | Returns: same collection, after the value was added to it.a Collection self, T an Object to be added to the collection. value)Overloads the left shift operator to provide an easy way to append objects to a BlockingQueue. |
| public static <K, V> Map | |
| public static <K, V> Map | |
| public static Number | |
| public static <K, V> Map. | |
| public static <T> T | |
| public static <T> T | |
| public static <T> T | |
| public static <T> T | |
| public static <T> T | |
| public static int | |
| public static long | |
| public static double | |
| public static <T> T | Returns: an item from the Iterable having the maximum value returned by calling the supplied closure with that item as parameter or null for an empty Iterablean Iterable self, Closure<V> a 1 or 2 arg Closure used to determine the correct ordering closure)Selects the item in the iterable which when passed as a parameter to the supplied closure returns the maximum value. |
| public static <T> T | |
| public static <T> T | |
| public static <T> T | max(Collection<T> self, Comparator<T> comparator)
Deprecated
Use the Iterable version of max instead
|
| public static <T> T | Returns: the maximum value or null for an empty Iterablean Iterable self, Comparator<T> a Comparator comparator)Selects the maximum value found in the Iterable using the given comparator. |
| public static <T> T | Returns: the maximum valuean Iterator self, Comparator<T> a Comparator comparator)Selects the maximum value found from the Iterator using the given comparator. |
| public static <T> T | Returns: the maximum valuean array self, Comparator<T> a Comparator comparator)Selects the maximum value found from the Object array using the given comparator. |
| public static MetaClass | |
| public static MetaClass | |
| public static <T> T | |
| public static <T> T | |
| public static <T> T | |
| public static <T> T | |
| public static <T> T | min(Collection<T> self, Comparator<T> comparator)
Deprecated
Use the Iterable version of min instead
|
| public static int | |
| public static long | |
| public static double | |
| public static <T> T | Returns: the minimum value or null for an empty Iterablean Iterable self, Comparator<T> a Comparator comparator)Selects the minimum value found in the Iterable using the given comparator. |
| public static <T> T | Returns: the minimum valuean Iterator self, Comparator<T> a Comparator comparator)Selects the minimum value found from the Iterator using the given comparator. |
| public static <T> T | Returns: the minimum valuean array self, Comparator<T> a Comparator comparator)Selects the minimum value found from the Object array using the given comparator. |
| public static <T> T | |
| public static <T> T | Returns: an item from the Iterable having the minimum value returned by calling the supplied closure with that item as parameter or null for an empty Iterablean Iterable self, Closure<V> a 1 or 2 arg Closure used to determine the correct ordering closure)Selects the item in the iterable which when passed as a parameter to the supplied closure returns the minimum value. |
| public static <K, V> Map. | |
| public static <T> T | |
| public static <T> T | |
| public static <T> Set | Returns: the resulting Seta Set object self, Collection<?> the items to remove from the Set removeMe)Create a Set composed of the elements of the first Set minus the elements of the given Collection. |
| public static <T> Set | |
| public static <T> Set | |
| public static <T> SortedSet | Returns: the resulting SortedSeta SortedSet object self, Collection<?> the items to remove from the SortedSet removeMe)Create a SortedSet composed of the elements of the first SortedSet minus the elements of the given Collection. |
| public static <T> SortedSet | |
| public static <T> SortedSet | |
| public static <T> T[] | |
| public static <T> T[] | |
| public static <T> List | Returns: a List with the given elements removeda List self, Collection<?> a Collection of elements to remove removeMe)Create a List composed of the elements of the first list minus every occurrence of elements of the given Collection. |
| public static <T> Collection | Returns: a Collection with the given elements removeda Collection self, Collection<?> a Collection of elements to remove removeMe)Create a new Collection composed of the elements of the first Collection minus every occurrence of elements of the given Collection. |
| public static <T> List | |
| public static <T> Collection | |
| public static <T> List | |
| public static <T> Collection | |
| public static <T> T[] | |
| public static <K, V> Map | |
| public static Number | |
| public static Number | |
| public static Number | |
| public static void | |
| public static void | |
| public static void | |
| public static void | |
| public static void | |
| public static void | |
| public static Number | |
| public static <T> Collection | |
| public static <T> Collection | |
| public static <T> List | |
| public static Number | |
| public static Number | |
| public static Number | |
| public static Number | Returns: the multiplication of left by righta BigDecimal left, Double a Double right)Multiply a BigDecimal and a Double. |
| public static Number | Returns: the multiplication of left by righta BigDecimal left, BigInteger a BigInteger right)Multiply a BigDecimal and a BigInteger. |
| public static <T> T | Returns: a new instance of this classa class c)Convenience method to dynamically create a new instance of this class. |
| public static <T> T | Returns: a new instance of this class.a class c, Object[] the constructor arguments args)Helper to construct a new instance from the given arguments. |
| public static Character | |
| public static Number | |
| public static int | Returns: a -ve number, 0 or a +ve number according to Groovy's compareTo contracta Comparable self, Comparable<T> another Comparable other)Provides a method that compares two comparables using Groovy's default number aware comparator. |
| public static Number | |
| public static BitSet | |
| public static Boolean | |
| public static <T> Set | Returns: the permutations from the listthe Iterable of items self)Finds all permutations of an iterable. |
| public static <T, V> List | Returns: the list of results of the application of the function on each permutationthe Iterable of items self, Closure<V> the function to apply on each permutation function)Finds all permutations of an iterable, applies a function to each permutation and collects the result into a list. |
| public static <T, V> List | permutations(List<T> self, Closure<V> function)
Deprecated
Use the Iterable version of permutations instead
|
| public static <K, V> Map | |
| public static <K, V> Map | Returns: a new Map containing all key, value pairs from self and entriesa Map self, Collection<? extends Map.a Collection of Map.Entry items to be added to the Map. entries)Returns a new |
| public static <T> T[] | Returns: A new array containing right appended to left.the left Array left, T[] the right Array right)Create an array as a union of two arrays. |
| public static <T> T[] | Returns: A new array containing left with right appended to it.the array left, T the value to append right)Create an array containing elements from an original array plus an additional appended element. |
| public static <T> T[] | Returns: A new array containing left with right appended to it.the array left, Collection<T> a Collection to be appended right)Create an array containing elements from an original array plus those from a Collection. |
| public static <T> T[] | |
| public static <T> Collection | Returns: the merged Collectionthe left Collection left, Collection<T> the right Collection right)Create a Collection as a union of two collections. |
| public static <T> Collection | |
| public static <T> Collection | Returns: the merged Collectionthe left Collection left, Iterable<T> the right Iterable right)Create a Collection as a union of a Collection and an Iterable. |
| public static <T> List | |
| public static <T> List | Returns: the merged Listthe left List left, Collection<T> the right Collection right)Create a List as a union of a List and a Collection. |
| public static <T> Set | |
| public static <T> Set | Returns: the merged Setthe left Set left, Collection<T> the right Collection right)Create a Set as a union of a Set and a Collection. |
| public static <T> SortedSet | |
| public static <T> SortedSet | Returns: the merged SortedSetthe left SortedSet left, Collection<T> the right Collection right)Create a SortedSet as a union of a SortedSet and a Collection. |
| public static <T> List | Returns: the new listan original list self, int index at which to insert the first element from the specified array index, T[] array containing elements to be merged with elements from the original list items)Creates a new List by inserting all of the elements in the specified array to the elements from the original List at the specified index. |
| public static <T> List | Returns: the new listan original List self, int index at which to insert the first element from the given additions List index, List<T> a List containing elements to be merged with elements from the original List additions)Creates a new List by inserting all of the elements in the given additions List to the elements from the original List at the specified index. |
| public static <T> List | Returns: the new listan original list self, int index at which to insert the first element from the given additions Iterable index, Iterable<T> an Iterable containing elements to be merged with the elements from the original List additions)Creates a new List by inserting all of the elements in the given Iterable to the elements from this List at the specified index. |
| public static <T> Collection | Returns: the resulting Collectiona Collection left, T an object to add/append right)Create a collection as a union of a Collection and an Object. |
| public static <T> Collection | |
| public static <T> List | |
| public static <T> Set | |
| public static <T> SortedSet | |
| public static Number | |
| public static Number | |
| public static Number | |
| public static <T> T | |
| public static Number | |
| public static Number | Returns: a Number to the power of a the exponenta BigDecimal self, Integer an Integer exponent exponent)Power of a BigDecimal to an integer certain exponent. |
| public static Number | Returns: a Number to the power of a the exponenta BigInteger self, Integer an Integer exponent exponent)Power of a BigInteger to an integer certain exponent. |
| public static Number | |
| public static Number | |
| public static BigInteger | Returns: a BigInteger to the power of a the exponenta BigInteger self, BigInteger a BigInteger exponent exponent)Power of a BigInteger to a BigInteger certain exponent. |
| public static Character | |
| public static Number | |
| protected static Object | Returns: the returned value from the arrayan array object self, int the index of interest idx)Implements the getAt(int) method for primitive type arrays. |
| protected static List | Returns: the returned values from the array corresponding to the rangean array object self, Range<T extends Comparable<T>> the range of indices of interest range)Implements the getAt(Range) method for primitive type arrays. |
| protected static List | Returns: the returned values from the arrayan array object self, Collection<E> the indices of interest indices)Implements the getAt(Collection) method for primitive type arrays. |
| protected static Object | Returns: the added valuean object self, int the index of interest idx, Object the new value to be put into the index of interest newValue)Implements the setAt(int idx) method for primitive type arrays. |
| public static void | |
| public static void | print(PrintWriter
a PrintWriter self, Object the value to print value)Print a value formatted Groovy style to the print writer. |
| public static void | print(PrintStream
a PrintStream self, Object the value to print value)Print a value formatted Groovy style to the print stream. |
| public static void | |
| public static void | print(Object
any Object self, PrintWriter the PrintWriter used for printing out)Print to a console in interactive format. |
| public static void | |
| public static void | |
| public static void | |
| public static void | printf(Object
any Object self, String A format string format, Object Argument which is referenced by the format specifiers in the format
string. The type of arg)arg should be one of Object[], List,
int[], short[], byte[], char[], boolean[], long[], float[], or double[].Prints a formatted string using the specified format string and arguments. |
| private static void | |
| private static void | |
| public static void | |
| public static void | |
| public static void | |
| public static void | println(PrintWriter
a PrintWriter self, Object the value to print value)Print a value formatted Groovy style (followed by a newline) to the print writer. |
| public static void | println(PrintStream
any Object self, Object the value to print value)Print a value formatted Groovy style (followed by a newline) to the print stream. |
| public static void | |
| public static void | println(Object
any Object self, PrintWriter the PrintWriter used for printing out)Print to a console in interactive format. |
| public static <T> boolean | |
| public static <K, V> Map | Returns: the same map, after the items have been added to it.a Map self, Collection<? extends Map.a Collection of Map.Entry items to be added to the Map. entries)Provides an easy way to append multiple Map.Entry values to a Map. |
| public static void | |
| public static <T> void | |
| public static <T> void | |
| public static void | putAt(List<E>
a List self, EmptyRange<T extends Comparable<T>> the (in this case empty) subset of the list to set range, Object the values to put at the given sublist or a Collection of values value)A helper method to allow lists to work with subscript operators. |
| public static void | putAt(List<E>
a List self, EmptyRange<T extends Comparable<T>> the (in this case empty) subset of the list to set range, Collection<E> the Collection of values value)A helper method to allow lists to work with subscript operators. |
| public static void | putAt(List<E>
a List self, IntRange the subset of the list to set range, Collection<E> the collection of values to put at the given sublist col)List subscript assignment operator when given a range as the index and the assignment operand is a collection. |
| public static void | |
| public static void | |
| public static void | |
| public static <K, V> V | |
| public static void | |
| public static void | |
| public static boolean | Returns: true if this collection changed as a result of the calla Collection to be modified self, Object[] array containing elements to be removed from this collection items)Modifies this collection by removing its elements that are contained within the specified object array. |
| public static <T> boolean | Returns: true if this collection changed as a result of the calla Collection to be modified self, Closure<V> a closure condition condition)Modifies this collection by removing the elements that are matched according to the specified closure condition. |
| public static <K, V> boolean | |
| public static <E> E | |
| public static <E> boolean | Returns: true if an element was removed as a result of this calla Collection self, Object element to be removed from this collection, if present o)Modifies this collection by removing a single instance of the specified element from this collection, if it is present. |
| public static <T> T | Returns: the item removed from the Lista List self)Removes the last item from the List. |
| private static <T> List | |
| public static List | Returns: A List of MetaMethods matching the argument types which will be empty if no matching methods existThe object to inspect self, String The name of the method of interest name, Object[] The argument types to match against argTypes)Returns an object satisfying Groovy truth if the implementing MetaClass responds to a method with the given name and arguments types. |
| public static List | Returns: A List of MetaMethods matching the given name or an empty list if no matching methods existThe object to inspect self, String The name of the method of interest name)Returns an object satisfying Groovy truth if the implementing MetaClass responds to a method with the given name regardless of the arguments. |
| public static boolean | Returns: true if this collection changed as a result of the calla Collection to be modified self, Object[] array containing elements to be retained from this collection items)Modifies this collection so that it retains only its elements that are contained in the specified array. |
| public static <T> boolean | Returns: true if this collection changed as a result of the calla Collection to be modified self, Closure<V> a closure condition condition)Modifies this collection so that it retains only its elements that are matched according to the specified closure condition. |
| public static <K, V> boolean | |
| public static <T> List | |
| public static <T> List | |
| public static <T> T[] | Returns: an array containing the reversed itemsan array self)Creates a new array containing items which are the same as this array but in reverse order. |
| public static <T> T[] | Returns: an array containing the reversed itemsan array self, boolean true if the array itself should be reversed in place, false if a new array should be createdReverse the items in an array. |
| public static <T> Iterator | |
| public static <K, V> Map | Returns: returns the self parameterthe map over which we iterate self, Closure<V> the 1 or 2 arg closure applied on each entry of the map closure)Allows a Map to be iterated through in reverse order using a closure. |
| public static <T> List | Returns: the original lista List self, Closure<V> a closure to which each item is passed. closure)Iterate over each element of the list in the reverse order. |
| public static <T> T[] | Returns: the original arrayan array self, Closure<V> a closure to which each item is passed closure)Iterate over each element of the array in the reverse order. |
| public static Number | Returns: the resulting numbera Number object self, Number the shift distance by which to right shift the number operand)Implementation of the right shift operator for integral types. |
| public static Number | Returns: the resulting numbera Number object self, Number the shift distance by which to right shift (unsigned) the number operand)Implementation of the right shift (unsigned) operator for integral types. |
| public static int | |
| public static float | |
| public static long | |
| public static double | |
| public static BigDecimal | Returns: the rounded value of that BigDecimala BigDecimal number)Round the value
Note that this method differs from |
| public static BigDecimal | Returns: a BigDecimal rounded to the number of decimal places specified by precisiona BigDecimal number, int the number of decimal places to keep precision)Round the value
Note that this method differs from |
| public static TimerTask | |
| public static void | setMetaClass(Class<T>
the class whose metaclass we wish to set self, MetaClass the new MetaClass metaClass)Sets the metaclass for a given class. |
| public static void | setMetaClass(Object
the object whose metaclass we want to set self, MetaClass the new metaclass value metaClass)Set the metaclass for an object. |
| public static void | setMetaClass(GroovyObject
the object whose metaclass we want to set self, MetaClass the new metaclass value metaClass)Set the metaclass for a GroovyObject. |
| public static void | |
| public static void | |
| public static <T> void | |
| public static <T> void | |
| public static <T> List | |
| public static <T> List | |
| public static <T> T[] | Returns: the shuffled arrayan array self)Creates a new array containing the elements of the specified array but in a random order. |
| public static <T> T[] | |
| public static int | |
| public static int | |
| public static int | |
| public static int | Returns: the length of the arraya boolean array array)Allows arrays to behave similar to collections. |
| public static int | Returns: the length of the arraya byte array array)Allows arrays to behave similar to collections. |
| public static int | Returns: the length of the arraya char array array)Allows arrays to behave similar to collections. |
| public static int | Returns: the length of the arraya short array array)Allows arrays to behave similar to collections. |
| public static int | Returns: the length of the arrayan int array array)Allows arrays to behave similar to collections. |
| public static int | Returns: the length of the arraya long array array)Allows arrays to behave similar to collections. |
| public static int | Returns: the length of the arraya float array array)Allows arrays to behave similar to collections. |
| public static int | Returns: the length of the arraya double array array)Allows arrays to behave similar to collections. |
| public static <T> List | |
| public static <T> List | |
| public static <K, V> Map | |
| public static <K, V> Map | Returns: the sorted mapthe original unsorted map self, Comparator<? super K> a Comparator comparator)Sorts the elements from the given map into a new ordered Map using the specified key comparator to determine the ordering. |
| public static <K, V> Map | |
| public static <T> T[] | Returns: the sorted arraythe array to be sorted self)Modifies this array so that its elements are in sorted order. |
| public static <T> T[] | Returns: the sorted arraythe array to be sorted self, boolean false will always cause a new array to be created, true will mutate the array in place mutate)Sorts the given array into sorted order. |
| public static <T> Iterator | |
| public static <T> Iterator | Returns: the sorted items as an Iteratorthe Iterator to be sorted self, Comparator<? super T> a Comparator used for comparing items comparator)Sorts the given iterator items into a sorted iterator using the comparator. |
| public static <T> List | Returns: a sorted Listthe Iterable to be sorted self, boolean false will always cause a new list to be created, true will mutate lists in place mutate, Comparator<? super T> a Comparator used for the comparison comparator)Sorts the Iterable using the given Comparator. |
| public static <T> T[] | Returns: the sorted arraythe array to be sorted self, Comparator<? super T> a Comparator used for the comparison comparator)Sorts the given array into sorted order using the given comparator. |
| public static <T> T[] | Returns: a sorted arraythe array containing elements to be sorted self, boolean false will always cause a new array to be created, true will mutate arrays in place mutate, Comparator<? super T> a Comparator used for the comparison comparator)Modifies this array so that its elements are in sorted order as determined by the given comparator. |
| public static <T> Iterator | |
| public static <T> T[] | |
| public static <T> T[] | Returns: the sorted arraythe array to be sorted self, boolean false will always cause a new array to be created, true will mutate arrays in place mutate, Closure<V> a Closure used to determine the correct ordering closure)Modifies this array so that its elements are in sorted order using the Closure to determine the correct ordering. |
| public static <T> List | |
| public static <T> List | Returns: a newly created sorted Listthe Iterable to be sorted self, boolean false will always cause a new list to be created, true will mutate lists in place mutate, Closure<V> a 1 or 2 arg Closure used to determine the correct ordering closure)Sorts this Iterable using the given Closure to determine the correct ordering. |
| public static <T> SortedSet | |
| public static <K, V> SortedMap | |
| public static Collection | |
| public static <T> Collection | Returns: a List whose first item is the accepted values and whose second item is the rejected valuesa Collection of values self, Closure<V> a closure condition closure)Splits all items into two collections based on the closure condition. |
| public static <T> Collection | |
| private static <T> Collection | |
| public static <T> List | |
| public static <T> List | |
| public static SpreadMap | Returns: a newly created SpreadMapa map self)Synonym for |
| public static String | |
| public static String | Returns: the resulting printf'd stringany Object self, String A format string format, Object Argument which is referenced by the format specifiers in the format
string. The type of arg)arg should be one of Object[], List,
int[], short[], byte[], char[], boolean[], long[], float[], or double[].Returns a formatted string using the specified format string and arguments. |
| public static void | |
| public static <K, V> Map | Returns: a new Map containing the given keysa Map map, Collection<K> a Collection of keys keys)Creates a sub-Map containing the given keys. |
| public static <K, V> Map | |
| public static <T> Set | Returns: the subsequences from the listthe List of items self)Finds all non-null subsequences of a list. |
| public static Object | |
| public static Object | |
| public static Object | |
| public static Object | |
| public static byte | Returns: The sum of all of the itemsThe array of values to add together self)Sums the items in an array. |
| public static short | Returns: The sum of all of the itemsThe array of values to add together self)Sums the items in an array. |
| public static int | Returns: The sum of all of the itemsThe array of values to add together self)Sums the items in an array. |
| public static long | Returns: The sum of all of the itemsThe array of values to add together self)Sums the items in an array. |
| public static char | Returns: The sum of all of the itemsThe array of values to add together self)Sums the items in an array. |
| public static float | Returns: The sum of all of the itemsThe array of values to add together self)Sums the items in an array. |
| public static double | Returns: The sum of all of the itemsThe array of values to add together self)Sums the items in an array. |
| public static Object | |
| public static Object | |
| public static Object | |
| public static Object | |
| private static Object | |
| public static byte | Returns: The sum of all of the items.an array of values to sum self, byte the items in the array will be summed to this initial value initialValue)Sums the items in an array, adding the result to some initial value. |
| public static short | Returns: The sum of all of the items.an array of values to sum self, short the items in the array will be summed to this initial value initialValue)Sums the items in an array, adding the result to some initial value. |
| public static int | Returns: The sum of all of the items.an array of values to sum self, int the items in the array will be summed to this initial value initialValue)Sums the items in an array, adding the result to some initial value. |
| public static long | Returns: The sum of all of the items.an array of values to sum self, long the items in the array will be summed to this initial value initialValue)Sums the items in an array, adding the result to some initial value. |
| public static char | Returns: The sum of all of the items.an array of values to sum self, char the items in the array will be summed to this initial value initialValue)Sums the items in an array, adding the result to some initial value. |
| public static float | Returns: The sum of all of the items.an array of values to sum self, float the items in the array will be summed to this initial value initialValue)Sums the items in an array, adding the result to some initial value. |
| public static double | Returns: The sum of all of the items.an array of values to sum self, double the items in the array will be summed to this initial value initialValue)Sums the items in an array, adding the result to some initial value. |
| public static Object | |
| public static <T> Object | |
| public static <T> Object | |
| public static <T> Object | |
| public static Object | sum(Collection<E> self, Object initialValue, Closure<V> closure)
Deprecated
Use the Iterable version of sum instead
|
| public static <T> Object | Returns: The sum of the values returned by applying the closure to each item of the collection.an Iterable self, Object the closure results will be summed to this initial value initialValue, Closure<V> a single parameter closure that returns a (typically) numeric value. closure)Sums the result of applying a closure to each item of an Iterable to some initial value. |
| public static <T> Object | Returns: The sum of the values returned by applying the closure to each item of the array.an array self, Object the closure results will be summed to this initial value initialValue, Closure<V> a single parameter closure that returns a (typically) numeric value. closure)Sums the result of applying a closure to each item of an array to some initial value. |
| public static <T> Object | Returns: The sum of the values returned by applying the closure to each item from the Iterator.an Iterator self, Object the closure results will be summed to this initial value initialValue, Closure<V> a single parameter closure that returns a (typically) numeric value. closure)Sums the result of applying a closure to each item of an Iterator to some initial value. |
| private static Object | |
| public static <T> List | |
| public static <T> T[] | Returns: selfan array self, int a position i, int a position j)Swaps two elements at the specified positions. |
| public static boolean[] | Returns: selfa boolean array self, int a position i, int a position j)Swaps two elements at the specified positions. |
| public static byte[] | Returns: selfa boolean array self, int a position i, int a position j)Swaps two elements at the specified positions. |
| public static char[] | Returns: selfa boolean array self, int a position i, int a position j)Swaps two elements at the specified positions. |
| public static double[] | Returns: selfa boolean array self, int a position i, int a position j)Swaps two elements at the specified positions. |
| public static float[] | Returns: selfa boolean array self, int a position i, int a position j)Swaps two elements at the specified positions. |
| public static int[] | Returns: selfa boolean array self, int a position i, int a position j)Swaps two elements at the specified positions. |
| public static long[] | Returns: selfa boolean array self, int a position i, int a position j)Swaps two elements at the specified positions. |
| public static short[] | Returns: selfa boolean array self, int a position i, int a position j)Swaps two elements at the specified positions. |
| public static <T> List | |
| public static <T> SortedSet | |
| public static <T> Collection | |
| public static <T> T[] | Returns: an array without its first elementan array self)Returns the items from the array excluding the first item. |
| public static <T> Iterator | |
| public static <T> List | Returns: a List of the tail values from the given Iterablean Iterable self)Calculates the tail values of this Iterable: the first value will be this list of all items from the iterable and the final one will be an empty list, with the intervening values the results of successive applications of tail on the items. |
| public static <T> List | |
| public static <T> SortedSet | Returns: a SortedSet consisting of the firstnum elements from this List,
or else all the elements from the SortedSet if it has less then num elements.the original SortedSet self, int the number of elements to take from this SortedSet num)Returns the first |
| public static <T> T[] | Returns: an array consisting of the firstnum elements of this array,
or else the whole array if it has less then num elements.the original array self, int the number of elements to take from this array num)Returns the first |
| public static <T> Collection | Returns: a Collection consisting of the firstnum elements from this Iterable,
or else all the elements from the Iterable if it has less then num elements.the original Iterable self, int the number of elements to take from this Iterable num)Returns the first |
| public static <K, V> Map | |
| public static <T> Iterator | |
| public static <T> T[] | Returns: an array consisting of the lastnum elements of this array,
or else the whole array if it has less then num elements.the original array self, int the number of elements to take from this array num)Returns the last |
| public static <T> Collection | Returns: a Collection consisting of the lastnum elements from this Iterable,
or else all the elements from the Iterable if it has less then num elements.the original Iterable self, int the number of elements to take from this Iterable num)Returns the last |
| public static <T> List | |
| public static <T> SortedSet | Returns: a SortedSet consisting of the lastnum elements from this SortedSet,
or else all the elements from the SortedSet if it has less then num elements.the original SortedSet self, int the number of elements to take from this SortedSet num)Returns the last |
| public static <T> List | Returns: a prefix of the given list where each element passed to the given closure evaluates to truethe original list self, Closure<V> the closure that must evaluate to true to
continue taking elements condition)Returns the longest prefix of this list where each element passed to the given closure condition evaluates to true. |
| public static <T> Collection | Returns: a Collection containing a prefix of the elements from the given Iterable where each element passed to the given closure evaluates to truean Iterable self, Closure<V> the closure that must evaluate to true to
continue taking elements condition)Returns a Collection containing the longest prefix of the elements from this Iterable where each element passed to the given closure evaluates to true. |
| public static <T> SortedSet | Returns: a prefix of the given SortedSet where each element passed to the given closure evaluates to truethe original SortedSet self, Closure<V> the closure that must evaluate to true to
continue taking elements condition)Returns the longest prefix of this SortedSet where each element passed to the given closure condition evaluates to true. |
| public static <K, V> Map | Returns: a prefix of the given Map where each entry (or key/value pair) passed to the given closure evaluates to truea Map self, Closure<V> a 1 (or 2) arg Closure that must evaluate to true for the
entry (or key and value) to continue taking elements condition)Returns the longest prefix of this Map where each entry (or key/value pair) when passed to the given closure evaluates to true. |
| public static <T> T[] | Returns: a prefix of the given array where each element passed to the given closure evaluates to truethe original array self, Closure<V> the closure that must evaluate to true to
continue taking elements condition)Returns the longest prefix of this array where each element passed to the given closure evaluates to true. |
| public static <T> Iterator | Returns: a prefix of elements in the given iterator where each element passed to the given closure evaluates to truethe Iterator self, Closure<V> the closure that must evaluate to true to
continue taking elements condition)Returns the longest prefix of elements in this iterator where each element passed to the given condition closure evaluates to true. |
| public static <T, U> U | |
| public static void | |
| public static String | Returns: the string representationan Object[] self)Returns the string representation of the given array. |
| public static BigDecimal | |
| public static BigInteger | |
| public static Boolean | |
| public static Double | |
| public static Float | |
| public static Integer | |
| public static <T> List | |
| public static <T> List | |
| public static <T> List | |
| public static <T> List | |
| public static <T> List | Returns: the array as a Listan Array of Objects array)Allows conversion of arrays into a mutable List. |
| public static List | Returns: a list containing the contents of this array.a byte array array)Converts this array to a List of the same size, with each element added to the list. |
| public static List | Returns: a list containing the contents of this array.a boolean array array)Converts this array to a List of the same size, with each element added to the list. |
| public static List | Returns: a list containing the contents of this array.a char array array)Converts this array to a List of the same size, with each element added to the list. |
| public static List | Returns: a list containing the contents of this array.a short array array)Converts this array to a List of the same size, with each element added to the list. |
| public static List | Returns: a list containing the contents of this array.an int array array)Converts this array to a List of the same size, with each element added to the list. |
| public static List | Returns: a list containing the contents of this array.a long array array)Converts this array to a List of the same size, with each element added to the list. |
| public static List | Returns: a list containing the contents of this array.a float array array)Converts this array to a List of the same size, with each element added to the list. |
| public static List | Returns: a list containing the contents of this array.a double array array)Converts this array to a List of the same size, with each element added to the list. |
| public static String | Returns: the string representationa Collection self)Returns the string representation of the given list. |
| public static String | Returns: the string representationa Collection self, int stop after approximately this many characters and append '...' maxSize)Returns the string representation of the given list. |
| public static Long | |
| public static char | Returns: the lowercase equivalent of the character, if any; otherwise, the character itself.a Character to convert self)Converts the character to lowercase. |
| public static String | Returns: the string representationa Map self)Returns the string representation of this map. |
| public static String | Returns: the string representationa Map self, int stop after approximately this many characters and append '...' maxSize)Returns the string representation of this map. |
| public static Set | Returns: a set containing the unique contents of this array.a byte array array)Converts this array to a Set, with each unique element added to the set. |
| public static Set | Returns: a set containing the unique contents of this array.a boolean array array)Converts this array to a Set, with each unique element added to the set. |
| public static Set | Returns: a set containing the unique contents of this array.a char array array)Converts this array to a Set, with each unique element added to the set. |
| public static Set | Returns: a set containing the unique contents of this array.a short array array)Converts this array to a Set, with each unique element added to the set. |
| public static Set | Returns: a set containing the unique contents of this array.an int array array)Converts this array to a Set, with each unique element added to the set. |
| public static Set | Returns: a set containing the unique contents of this array.a long array array)Converts this array to a Set, with each unique element added to the set. |
| public static Set | Returns: a set containing the unique contents of this array.a float array array)Converts this array to a Set, with each unique element added to the set. |
| public static Set | Returns: a set containing the unique contents of this array.a double array array)Converts this array to a Set, with each unique element added to the set. |
| public static <T> Set | |
| public static <T> Set | |
| public static <T> Set | |
| public static <T> Set | |
| public static <T> List | |
| public static <T> List | Returns: a sorted Listthe Iterable to be sorted self, Comparator<T> a Comparator used for the comparison comparator)Sorts the Iterable using the given Comparator. |
| public static <T> List | |
| public static <T> Iterator | |
| public static <T> Iterator | Returns: the sorted items as an Iteratorthe Iterator to be sorted self, Comparator<T> a Comparator used for comparing items comparator)Sorts the given iterator items using the comparator. |
| public static <T> Iterator | |
| public static <T> T[] | Returns: the sorted arraythe array to be sorted self)Returns a sorted version of the given array using the supplied comparator. |
| public static <T> T[] | Returns: the sorted arraythe array to be sorted self, Comparator<T> a Comparator used for the comparison comparator)Returns a sorted version of the given array using the supplied comparator to determine the resulting order. |
| public static <T> T[] | |
| public static <K, V> Map | Returns: the sorted mapthe original unsorted map self)Sorts the elements from the given map into a new ordered map using
a |
| public static <K, V> Map | Returns: the sorted mapthe original unsorted map self, Comparator<Map.a Comparator used for the comparison comparatorSorts the elements from the given map into a new ordered map using the supplied comparator to determine the ordering. |
| public static <K, V> Map | |
| public static <T> Set | |
| public static <K, V> Map | |
| public static SpreadMap | Returns: a newly created SpreadMap if this map is not null and its size is positive.a map to be converted into a SpreadMap self)Returns a new |
| public static SpreadMap | Returns: a newly created SpreadMapan object array self)Creates a spreadable map from this array. |
| public static SpreadMap | Returns: a newly created SpreadMapa list self)Creates a spreadable map from this list. |
| public static SpreadMap | Returns: a newly created SpreadMapan iterable self)Creates a spreadable map from this iterable. |
| public static String | Returns: the string representationan array self)Returns the string representation of the given array. |
| public static String | Returns: the string representationan array self)Returns the string representation of the given array. |
| public static String | Returns: the string representationan array self)Returns the string representation of the given array. |
| public static String | Returns: the string representationan array self)Returns the string representation of the given array. |
| public static String | Returns: the string representationan array self)Returns the string representation of the given array. |
| public static String | Returns: the string representationan array self)Returns the string representation of the given array. |
| public static String | Returns: the string representationan array self)Returns the string representation of the given array. |
| public static String | Returns: the string representationan array self)Returns the string representation of the given array. |
| public static String | Returns: the string representationa Map self)Returns the string representation of the given map. |
| public static String | Returns: the string representationa Collection self)Returns the string representation of the given collection. |
| public static String | |
| public static String | |
| public static <T> Iterator | Returns: an Iterator with no duplicate itemsan Iterator self, Closure<V> a Closure used to determine unique items condition)Returns an iterator equivalent to this iterator but with all duplicated items removed where duplicate (equal) items are deduced by calling the supplied Closure condition. |
| public static <T> Iterator | Returns: an Iterator with no duplicate itemsan Iterator self, Comparator<T> a Comparator used to determine unique (equal) items
If comparator)null, the Comparable natural ordering of the elements will be used.Returns an iterator equivalent to this iterator with all duplicated items removed by using the supplied comparator. |
| public static <T> Iterator | |
| public static <T> Collection | Returns: the Collection of non-duplicate itemsan Iterable self, Comparator<T> a Comparator used to determine unique (equal) items
If comparator)null, the Comparable natural ordering of the elements will be used.Returns a Collection containing the items from the Iterable but with duplicates removed. |
| public static <T> List | Returns: the List of non-duplicate itemsa List self, Comparator<T> a Comparator used to determine unique (equal) items
If comparator)null, the Comparable natural ordering of the elements will be used.Returns a List containing the items from the List but with duplicates removed. |
| public static <T> Collection | |
| public static <T> List | |
| public static <T> Collection | |
| public static <T> List | |
| public static <T> T[] | Returns: the unique items from the arrayan array self, Comparator<T> a Comparator used to determine unique (equal) items
If comparator)null, the Comparable natural ordering of the elements will be used.Returns a new Array containing the items from the original Array but with duplicates removed with the supplied comparator determining which items are unique. |
| public static <T> T[] | Returns: the unique items from the arrayan array self)Returns a new Array containing the items from the original Array but with duplicates removed using the natural ordering of the items in the array. |
| public static <T> T[] | |
| public static char | Returns: the uppercase equivalent of the character, if any; otherwise, the character itself.a Character to convert self)Converts the character to uppercase. |
| public static List | |
| public static int[][] | Returns: the transposed 2D int arraya 2D int array self)A transpose method for 2D int arrays. |
| public static long[][] | Returns: the transposed 2D long arraya 2D long array self)A transpose method for 2D long arrays. |
| public static double[][] | Returns: the transposed 2D double arraya 2D double array self)A transpose method for 2D double arrays. |
| public static float | |
| public static float | |
| public static double | |
| public static double | |
| public static BigDecimal | Returns: a BigDecimal truncated to 0 decimal placesa BigDecimal number)Truncate the value |
| public static BigDecimal | Returns: a BigDecimal truncated to the number of decimal places specified by precisiona BigDecimal number, int the number of decimal places to keep precision)Truncate the value |
| public static Number | |
| public static Number | |
| public static <T> Iterator | |
| public static <T> Collection | Returns: the now modified collectiona collection self)Modifies this collection to remove all duplicated items, using Groovy's default number-aware comparator. |
| public static <T> List | |
| public static <T> Collection | Returns: the now modified collectiona collection self, boolean false will cause a new list containing unique items from the collection to be created, true will mutate collections in place mutate)Remove all duplicates from a given Collection using Groovy's default number-aware comparator. |
| public static <T> List | |
| public static <T> Iterator | |
| public static <T> Collection | Returns: self without any duplicatesa Collection self, Closure<V> a 1 or 2 arg Closure used to determine unique items closure)A convenience method for making a collection unique using a Closure to determine duplicate (equal) items. |
| public static <T> List | |
| public static <T> Collection | Returns: self without any duplicatesa Collection self, boolean false will always cause a new list to be created, true will mutate lists in place mutate, Closure<V> a 1 or 2 arg Closure used to determine unique items closure)A convenience method for making a collection unique using a Closure to determine duplicate (equal) items. |
| public static <T> List | Returns: self without any duplicatesa List self, boolean false will always cause a new list to be created, true will mutate lists in place mutate, Closure<V> a 1 or 2 arg Closure used to determine unique items closure)A convenience method for making a List unique using a Closure to determine duplicate (equal) items. |
| public static <T> Iterator | Returns: the modified Iteratoran Iterator self, Comparator<T> a Comparator comparator)Returns an iterator equivalent to this iterator with all duplicated items removed by using the supplied comparator. |
| public static <T> Collection | Returns: self the now modified collection without duplicatesa Collection self, Comparator<T> a Comparator comparator)Remove all duplicates from a given Collection. |
| public static <T> List | Returns: self the now modified List without duplicatesa List self, Comparator<T> a Comparator comparator)Remove all duplicates from a given List. |
| public static <T> Collection | Returns: self the collection without duplicatesa Collection self, boolean false will always cause a new collection to be created, true will mutate collections in place mutate, Comparator<T> a Comparator comparator)Remove all duplicates from a given Collection. |
| public static <T> List | Returns: self the List without duplicatesa List self, boolean false will always cause a new List to be created, true will mutate List in place mutate, Comparator<T> a Comparator comparator)Remove all duplicates from a given List. |
| private static <T> List | |
| private static <T> List | |
| public static void | |
| public static void | |
| public static void | |
| public static void | |
| public static void | |
| public static void | |
| public static void | |
| public static void | upto(BigInteger
a BigInteger self, Number the end number to, Closure<V> the code to execute for each number closure)Iterates from this number up to the given number, inclusive, incrementing by one each time. |
| public static void | upto(BigDecimal
a BigDecimal self, Number the end number to, Closure<V> the code to execute for each number closure)Iterates from this number up to the given number, inclusive, incrementing by one each time. |
| public static <T> T | |
| public static <T> T | |
| public static Object | |
| public static <T, U> T | |
| public static <T, U extends T, V extends T> T | Returns: the self object or the result of calling the closure depending on 'returning'the object to have a closure act upon self, boolean if true, return the self object; otherwise, the result of calling the closure returning, Closure<T> the closure to call on the object closure)Allows the closure to be called for the object reference self. |
| public static <K, V> Map | Returns: the wrapped Mapa Map self, Closure<V> a Closure which is passed the unknown key init)Wraps a map using the decorator pattern with a wrapper that intercepts all calls
to |
| public static <T> ListWithDefault | Returns: the decorated Lista List self, Closure<T> a Closure with the target index as parameter which generates the default value init)An alias for |
| public static <T> List | |
| public static <T> ListWithDefault | Returns: the wrapped Lista List self, Closure<T> a Closure with the target index as parameter which generates the default value init)Decorates a list allowing it to grow when called with a non-existent index value. |
| public static <T> List | |
| public static <E> List | |
| public static <E> List | |
| public static <E> Iterator | |
| public static <E> Iterator | |
| public static <T> ListWithDefault | Returns: the decorated Lista List self, Closure<T> a Closure with the target index as parameter which generates the default value init)Decorates a list allowing it to grow when called with a non-existent index value. |
| public static <T> List | |
| public static Object | Returns: a proxy implementing the trait interfacesobject to be wrapped self, Class<?>... a list of trait classes traits)Dynamically wraps an instance into something which implements the supplied trait classes. |
| public static BitSet | |
| public static Number | |
| public static Boolean |