Groovy – pop()
Removes the last item from this List. Syntax Object pop() Parameters None Return Value The popped value from the list. Example Following is an example of the usage of this…
Groovy
Removes the last item from this List. Syntax Object pop() Parameters None Return Value The popped value from the list. Example Following is an example of the usage of this…
Creates a new List composed of the elements of the original together with those specified in the collection. Syntax List plus(Collection collection) Parameters Collection – The collection of values to…
Creates a new List composed of the elements of the original without those specified in the collection. Syntax List minus(Collection collection) Parameters Collection – The collection of values to minus…
Returns true if this List contains no elements. Syntax boolean isEmpty() Parameters None Return Value True or false depending on whether the list is empty or not. Example Following is…
Returns the element at the specified position in this list. Syntax Object get(int index) Parameters Index – The index at which the value needs to be returned. Return Value The…
Returns true if this List contains the specified value. Syntax boolean contains(Object value) Parameters Value − The value to find in the list. Return Value True or false depending on if…
Append the new value to the end of this List. This method has 2 different variants. boolean add(Object value) − Append the new value to the end of this List. Syntax…
The List is a structure used to store a collection of data items. In Groovy, the List holds a sequence of object references. Object references in a List occupy a…
Returns a view of the portion of this Range between the specified fromIndex, inclusive, and toIndex, exclusive Syntax List subList(int fromIndex, int toIndex) Parameters fromIndex – Starting index of the…
Returns the number of elements in this Range. Syntax int size() Parameters None Return Value Returns the size of the range. Following is an example of the usage of this…