public class DefaultAbsoluteInterval extends Object implements AbsoluteInterval
| Modifier and Type | Method and Description |
|---|---|
Object |
clone()
Creates a copy of the object.
|
boolean |
contains(Instant instant)
Does this time interval contain the specified time instant.
|
boolean |
equals(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.
|
String |
toString() |
public int size()
AbsoluteIntervalsize in interface AbsoluteIntervalpublic AbsoluteIntervalType getFieldType(int index)
AbsoluteIntervalgetFieldType in interface AbsoluteIntervalindex - the index to retrievepublic int getValue(int index)
AbsoluteIntervalgetValue in interface AbsoluteIntervalindex - the index to retrievepublic Chronology getChronology()
TimegetChronology in interface Timepublic int getYears()
AbsoluteIntervalgetYears in interface AbsoluteIntervalpublic int getMonths()
AbsoluteIntervalgetMonths in interface AbsoluteIntervalpublic int getWeeks()
public int getDays()
AbsoluteIntervalgetDays in interface AbsoluteIntervalpublic int getHours()
AbsoluteIntervalgetHours in interface AbsoluteIntervalpublic int getMinutes()
AbsoluteIntervalgetMinutes in interface AbsoluteIntervalpublic int getSeconds()
AbsoluteIntervalgetSeconds in interface AbsoluteIntervalpublic int getMillis()
AbsoluteIntervalgetMillis in interface AbsoluteIntervalpublic boolean isAfter(AbsoluteInterval period)
AbsoluteIntervalisAfter in interface AbsoluteIntervalperiod - the insterval to compare to, null means nowtrue if this time interval is after the absoluteIntervalpublic boolean isBefore(AbsoluteInterval period)
AbsoluteIntervalisBefore in interface AbsoluteIntervalperiod - the insterval to compare to, null means nowtrue if this time interval is before the absoluteIntervalpublic Object clone() throws CloneNotSupportedException
Cloneableclone in class ObjectCloneNotSupportedException - 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()
AbsoluteIntervalgetStart in interface AbsoluteIntervalgetStart in interface Intervalpublic AbsoluteInstant getEnd()
AbsoluteIntervalgetEnd in interface AbsoluteIntervalgetEnd in interface Intervalpublic boolean isRelative()
TimeisRelative in interface Timetruepublic boolean isAbsolute()
TimeisAbsolute in interface Timetrue if the time object is absolutepublic boolean isInterval()
TimeisInterval in interface Timetrue if the time object is an intervalpublic boolean isInstant()
Timepublic boolean intersects(Time time)
Timeintersects in interface Timetime - 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)
Intervalpublic Duration toStandardDuration()
IntervaltoStandardDuration in interface Interval