Groovy – containsKey()
Does this Map contain this key? Syntax boolean containsKey(Object key) Parameters Key − The key used to search for. Return Value True or false depending on whether the key value is…
Does this Map contain this key? Syntax boolean containsKey(Object key) Parameters Key − The key used to search for. Return Value True or false depending on whether the key value is…
A Maps (also known as an associative array, dictionary, table, and hash) is an unordered collection of object references. The elements in a Map collection are accessed by a key…
Returns a sorted copy of the original List. Syntax List sort() Parameters None Return Value The sorted list. Example Following is an example of the usage of this method −…
Obtains the number of elements in this List. Syntax int size() Parameters None Return Value The size of the list. Example Following is an example of the usage of this…
Create a new list that is the reverse the elements of the original List. Syntax List reverse() Parameters None Return Value The reversed list. Example Following is an example of…
Removes the element at the specified position in this List. Syntax Object remove(int index) Parameters Index – Index at which the value needs to be removed. Return Value The removed…
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…