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()
AbsoluteInstant
size
in interface AbsoluteInstant
public AbsoluteInstantType getFieldType(int index)
AbsoluteInstant
getFieldType
in interface AbsoluteInstant
index
- the index to retrievepublic int getValue(int index)
AbsoluteInstant
getValue
in interface AbsoluteInstant
index
- the indexpublic boolean isAfter(Instant partial)
Instant
public boolean isBefore(Instant partial)
Instant
public boolean isEqual(Instant partial)
Instant
public Chronology getChronology()
Time
getChronology
in interface Time
public Object clone() throws CloneNotSupportedException
Cloneable
clone
in class Object
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 int getYears()
AbsoluteInstant
getYears
in interface AbsoluteInstant
public int getMonths()
AbsoluteInstant
getMonths
in interface AbsoluteInstant
public int getWeeks()
AbsoluteInstant
getWeeks
in interface AbsoluteInstant
public int getDays()
AbsoluteInstant
getDays
in interface AbsoluteInstant
public int getHours()
AbsoluteInstant
getHours
in interface AbsoluteInstant
public int getMinutes()
AbsoluteInstant
getMinutes
in interface AbsoluteInstant
public int getSeconds()
AbsoluteInstant
getSeconds
in interface AbsoluteInstant
public int getMillis()
AbsoluteInstant
getMillis
in interface AbsoluteInstant
public 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 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 AbsoluteInstant minus(AbsoluteInterval interval)
AbsoluteInstant
this
is returned. *minus
in interface AbsoluteInstant
public AbsoluteInstant plus(AbsoluteInterval interval)
AbsoluteInstant
this
is returned.plus
in interface AbsoluteInstant
public Duration toStandardDuration()
AbsoluteInstant
toStandardDuration
in interface AbsoluteInstant