public class DefaultAbsoluteInterval extends java.lang.Object implements AbsoluteInterval
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone()
Creates a copy of the object.
|
boolean |
contains(Instant instant)
Does this time interval contain the specified time instant.
|
boolean |
equals(java.lang.Object obj) |
Chronology |
getChronology()
Gets the chronology of the instant.
|
int |
getDays()
Gets the number of days of this absolute instant.
|
AbsoluteInstant |
getEnd()
Gets the end of this time interval, which is exclusive, as an Instant.
|
AbsoluteIntervalType |
getFieldType(int index)
Gets the field type at the specified index.
|
int |
getHours()
Gets the number of hours of this absolute instant.
|
int |
getMillis()
Gets the number of millis of this absolute instant.
|
int |
getMinutes()
Gets the number of minutes of this absolute instant.
|
int |
getMonths()
Gets the number of months of this absolute instant.
|
int |
getSeconds()
Gets the number of seconds of this absolute instant.
|
AbsoluteInstant |
getStart()
Gets the start of this time interval, which is inclusive, as an Instant.
|
int |
getValue(int index)
Gets the value at the specified index.
|
int |
getWeeks() |
int |
getYears()
Gets the number of years of this absolute instant.
|
boolean |
intersects(AbsoluteInterval absoluteInsterInterval) |
boolean |
intersects(Time time)
Does this time intersects with the time passed.
|
boolean |
isAbsolute()
Checks if the time is an absolute temporal type, that is an object that doesn't
has a time zone.
|
boolean |
isAfter(AbsoluteInterval period)
Is this time interval after the specified interval.
|
boolean |
isBefore(AbsoluteInterval period)
Is this time interval before the specified interval.
|
boolean |
isInstant()
Checks if the time is an instant, that is an object that represents
a position in a time scale.
|
boolean |
isInterval()
Checks if the time is an interval, that is an object that represents
a period of time between two instants.
|
boolean |
isRelative()
Checks if the time is a relative temporal type, that is an object that has
a Chronology that establish how a time object can be converted into other
object with date time fields.
|
int |
size()
Gets the number of fields that this absolute interval supports.
|
Duration |
toStandardDuration()
Gets the duration of the interval.
|
java.lang.String |
toString() |
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
cloneQuietly, cloneQuietly
public int size()
AbsoluteInterval
size
in interface AbsoluteInterval
public AbsoluteIntervalType getFieldType(int index)
AbsoluteInterval
getFieldType
in interface AbsoluteInterval
index
- the index to retrievepublic int getValue(int index)
AbsoluteInterval
getValue
in interface AbsoluteInterval
index
- the index to retrievepublic java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public Chronology getChronology()
Time
getChronology
in interface Time
public int getYears()
AbsoluteInterval
getYears
in interface AbsoluteInterval
public int getMonths()
AbsoluteInterval
getMonths
in interface AbsoluteInterval
public int getWeeks()
public int getDays()
AbsoluteInterval
getDays
in interface AbsoluteInterval
public int getHours()
AbsoluteInterval
getHours
in interface AbsoluteInterval
public int getMinutes()
AbsoluteInterval
getMinutes
in interface AbsoluteInterval
public int getSeconds()
AbsoluteInterval
getSeconds
in interface AbsoluteInterval
public int getMillis()
AbsoluteInterval
getMillis
in interface AbsoluteInterval
public boolean isAfter(AbsoluteInterval period)
AbsoluteInterval
isAfter
in interface AbsoluteInterval
period
- the insterval to compare to, null means nowtrue
if this time interval is after the absoluteIntervalpublic boolean isBefore(AbsoluteInterval period)
AbsoluteInterval
isBefore
in interface AbsoluteInterval
period
- the insterval to compare to, null means nowtrue
if this time interval is before the absoluteIntervalpublic java.lang.Object clone() throws java.lang.CloneNotSupportedException
Cloneable
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
- if the instance of the object cannot
be cloned. As this is extending Cloneable
so its sure
it implements it, so this exception may be used for problems on specific
object instances.Object#clone()}.
public AbsoluteInstant getStart()
AbsoluteInterval
getStart
in interface AbsoluteInterval
getStart
in interface Interval
public AbsoluteInstant getEnd()
AbsoluteInterval
getEnd
in interface AbsoluteInterval
getEnd
in interface Interval
public final boolean isRelative()
Time
isRelative
in interface Time
true
public boolean isAbsolute()
Time
isAbsolute
in interface Time
true
if the time object is absolutepublic boolean isInterval()
Time
isInterval
in interface Time
true
if the time object is an intervalpublic final boolean isInstant()
Time
public boolean intersects(Time time)
Time
intersects
in interface Time
time
- an instant to check against, null means nowtrue
if the time intersects with the time passed inpublic boolean intersects(AbsoluteInterval absoluteInsterInterval)
public boolean contains(Instant instant)
Interval
public Duration toStandardDuration()
Interval
toStandardDuration
in interface Interval