
Methods inherited from interface java.lang.Remove all duplicates from a given Collection.Ī convenience method for making a collection unique using a Closure Unique(boolean mutate, Comparator comparator) Remove all duplicates from a given Collection using Groovy's default number-aware comparator.Ī convenience method for making a collection unique using a Closure to determine duplicate (equal) items. Modifies this collection to remove all duplicated items, using Groovy's Returns the string representation of the given list. Splits all items into two collections based on the closure condition. Modifies this collection so that it retains only its elements that are contained

That are matched according to the specified closure condition. Modifies this collection so that it retains only its elements

Modifies this collection by removing a single instance of the specifiedĮlement from this collection, if it is present. Modifies this collection by removing its elements that are contained Modifies this collection by removing the elements that are matched according Overloads the left shift operator to provide an easy way to appendĬreate a new Collection composed of the elements of the first Collection minusĮvery occurrence of elements of the given Collection.Ĭreate a Collection as a union of a Collection and an Iterable.Ĭreate a collection as a union of a Collection and an Object.Ĭreate a Collection as a union of two collections. Operand is contained in any of the 'case' values. 'Case' implementation for collections which tests if the 'switch'

Intersect( Collection right, Comparator comparator) The 2-arg closure along with the first item.Ĭreate a Collection composed of the intersection of both collections. Iterates through the given Collection, passing in the initial value to Inject( Object initialValue, Closure closure) Uses the head of the Collection as the initial value, and iterates over the tail. Performs the same function as the version of inject that takes an initial value, but Kinds of filters like regular expressions, classes, ranges etc. The given filter - calling the Object#isCase() Iterates over the collection of items and returns each item that matches Using the IDENTITY Closure as a filter - effectively returning all elements which satisfy Groovy truth. Iterates over the collection returning each element that matches Support the subscript operator for Collection. Passing each item and the item's index (a counter starting atįinds the first item matching the IDENTITY Closure (i.e. matching Groovy truth).įinds the first value matching the closure condition.įinds the items matching the IDENTITY Closure (i.e. matching Groovy truth).įinds all values matching the closure condition. Iterates through a Collection, passing each item to the given closure.

Into a new value using the closure as a transformer. Recursively iterates through this collection transforming each non-Collection value Modifies the collection by adding all the elements in the specified array to the collection.Īdds all items from the iterator to the Collection.Ĭoerce a collection instance to a boolean value.Ī convenience method for creating an immutable Collection.Ī convenience method for creating a synchronized Collection.Ĭonverts the given collection to another type.Ĭreates an unmodifiable view of a Collection. Adds all items from the iterable to the Collection.
