Package com.ibm.icu.util
Class DateInterval
- java.lang.Object
-
- com.ibm.icu.util.DateInterval
-
- All Implemented Interfaces:
Serializable
public final class DateInterval extends Object implements Serializable
This class represents date interval. It is a pair of long representing from date 1 to date 2.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DateInterval(long from, long to)Constructor given from date and to date.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object a)Override equalslonggetFromDate()Get the from date.longgetToDate()Get the to date.inthashCode()Override hashcodeStringtoString()Override toString
-
-
-
Method Detail
-
getFromDate
public long getFromDate()
Get the from date.- Returns:
- the from date in dateInterval.
-
getToDate
public long getToDate()
Get the to date.- Returns:
- the to date in dateInterval.
-
equals
public boolean equals(Object a)
Override equals- Overrides:
equalsin classObject- Parameters:
a- the object to compare this instance with.- Returns:
trueif the specified object is equal to thisObject;falseotherwise.- See Also:
Object.hashCode()
-
hashCode
public int hashCode()
Override hashcode- Overrides:
hashCodein classObject- Returns:
- this object's hash code.
- See Also:
Object.equals(java.lang.Object)
-
-