Groovy – Dates & Times toString()
Converts this Date object to a string of the form dow mon dd hh:mm:ss zzz yyyy Syntax public String toString() Parameters None. Return Value A string representation of this date.…
Converts this Date object to a string of the form dow mon dd hh:mm:ss zzz yyyy Syntax public String toString() Parameters None. Return Value A string representation of this date.…
Compares two Dates for ordering. Syntax public int compareTo(Date anotherDate) Parameters anotherDate – the Date to be compared. Return Value − The value 0 if the argument Date is equal to this Date;…
Compares two dates for equality. The result is true if and only if the argument is not null and is a Date object that represents the same point in time,…
Tests if this date is after the specified date. Syntax public boolean after(Date when) Parameters When – The date to compare against. Return Value − True if and only if the…
The class Date represents a specific instant in time, with millisecond precision. The Date class has two constructors as shown below. Date() Syntax public Date() Parameters − None. Return Value Allocates…
Returns a collection view of the values contained in this Map. Syntax Collection values() Parameters None. Return Value Collection of values. Example Following is an example of the usage of…
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)…