public class DefaultAbsoluteInstant extends Object implements AbsoluteInstant
| Modifier and Type | Method and Description |
|---|---|
Object |
clone()
Creates a copy of the object.
|
boolean |
equals(Object obj) |
Chronology |
getChronology()
Gets the chronology of the instant.
|
int |
getDays()
Gets the number of days of this absolute instant.
|
AbsoluteInstantType |
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.
|
int |
getValue(int index)
Gets the value of the field at the specifed index.
|
int |
getWeeks()
Gets the number of weeks of this absolute instant.
|
int |
getYears()
Gets the number of years of this absolute instant.
|
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(Instant partial)
Is this instant after the instant passed in comparing solely by millisecond.
|
boolean |
isBefore(Instant partial)
Is this instant before the instant passed in comparing solely by millisecond.
|
boolean |
isEqual(Instant partial)
Is this instant equal to the instant passed in comparing solely by millisecond.
|
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.
|
AbsoluteInstant |
minus(AbsoluteInterval interval)
Gets a copy of this instance with the specified period take away.
|
AbsoluteInstant |
plus(AbsoluteInterval interval)
Gets a copy of this instance with the specified period added.
|
int |
size()
Gets the number of fields in this absolute instant.
|
Duration |
toStandardDuration()
Gets the duration of the instant.
|
String |
toString() |
public int size()
AbsoluteInstantsize in interface AbsoluteInstantpublic AbsoluteInstantType getFieldType(int index)
AbsoluteInstantgetFieldType in interface AbsoluteInstantindex - the index to retrievepublic int getValue(int index)
AbsoluteInstantgetValue in interface AbsoluteInstantindex - the indexpublic boolean isAfter(Instant partial)
Instantpublic boolean isBefore(Instant partial)
Instantpublic boolean isEqual(Instant partial)
Instantpublic Chronology getChronology()
TimegetChronology in interface Timepublic 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 int getYears()
AbsoluteInstantgetYears in interface AbsoluteInstantpublic int getMonths()
AbsoluteInstantgetMonths in interface AbsoluteInstantpublic int getWeeks()
AbsoluteInstantgetWeeks in interface AbsoluteInstantpublic int getDays()
AbsoluteInstantgetDays in interface AbsoluteInstantpublic int getHours()
AbsoluteInstantgetHours in interface AbsoluteInstantpublic int getMinutes()
AbsoluteInstantgetMinutes in interface AbsoluteInstantpublic int getSeconds()
AbsoluteInstantgetSeconds in interface AbsoluteInstantpublic int getMillis()
AbsoluteInstantgetMillis in interface AbsoluteInstantpublic 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 AbsoluteInstant minus(AbsoluteInterval interval)
AbsoluteInstantthis is returned. *minus in interface AbsoluteInstantpublic AbsoluteInstant plus(AbsoluteInterval interval)
AbsoluteInstantthis is returned.plus in interface AbsoluteInstantpublic Duration toStandardDuration()
AbsoluteInstanttoStandardDuration in interface AbsoluteInstant