Top Description Fields Constructors Methods
com.ibm.icu.util

public final Class DateInterval

extends Object
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable
Imports
java.io.Serializable

This class represents date interval. It is a pair of long representing from date 1 to date 2.
ICU Status
Stable since ICU 4.0.

Field Summary

Modifier and TypeField and Description
private final long
private static final long
private final long

Constructor Summary

AccessConstructor and Description
public
DateInterval(long
The from date in date interval.
from
,
long
The to date in date interval.
to
)

Constructor given from date and to date.

Method Summary

Modifier and TypeMethod and Description
public boolean
equals(Object
the reference object with which to compare.
a
)

Overrides java.lang.Object.equals.

Override equals
public long

Returns:

the from date in dateInterval.
getFromDate
()

Get the from date.

public long

Returns:

the to date in dateInterval.
getToDate
()

Get the to date.

public int
hashCode()

Overrides java.lang.Object.hashCode.

Override hashcode
public String
toString()

Overrides java.lang.Object.toString.

Override toString
Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAllwaitwaitwait

Field Detail

fromDateback to summary
private final long fromDate
serialVersionUIDback to summary
private static final long serialVersionUID
toDateback to summary
private final long toDate

Constructor Detail

DateIntervalback to summary
public DateInterval(long from, long to)

Constructor given from date and to date.

Parameters
from:long

The from date in date interval.

to:long

The to date in date interval.

ICU Status
Stable since ICU 4.0.

Method Detail

equalsback to summary
public boolean equals(Object a)

Overrides java.lang.Object.equals.

Override equals

Parameters
a:Object

Doc from java.lang.Object.equals.

the reference object with which to compare.

Returns:boolean

Doc from java.lang.Object.equals.

true if this object is the same as the obj argument; false otherwise.

ICU Status
Stable since ICU 4.0.
getFromDateback to summary
public long getFromDate()

Get the from date.

Returns:long

the from date in dateInterval.

ICU Status
Stable since ICU 4.0.
getToDateback to summary
public long getToDate()

Get the to date.

Returns:long

the to date in dateInterval.

ICU Status
Stable since ICU 4.0.
hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Override hashcode

Returns:int

Doc from java.lang.Object.hashCode.

a hash code value for this object.

ICU Status
Stable since ICU 4.0.
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Override toString

Returns:String

Doc from java.lang.Object.toString.

a string representation of the object.

ICU Status
Stable since ICU 4.0.