Groovy – Maps size()
Returns the number of key-value mappings in this Map. Syntax int size() Parameters None. Return Value The size of the map. Example Following is an example of the usage of…
Groovy
Returns the number of key-value mappings in this Map. Syntax int size() Parameters None. Return Value The size of the map. Example Following is an example of the usage of…
Associates the specified value with the specified key in this Map. If this Map previously contained a mapping for this key, the old value is replaced by the specified value.…
Obtain a Set of the keys in this Map. Syntax Set keySet() Parameters None. Return Value Set of Keys. Example Following is an example of the usage of this method…
Look up the key in this Map and return the corresponding value. If there is no entry in this Map for the key, then return null. Syntax Object get(Object key)…
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…