public interface TimeSupportManager
Modifier and Type | Method and Description |
---|---|
void |
addRelativeInstantPattern(String relativeInstantPattern)
Add a time pattern that is used to parse a relative instant
|
AbsoluteInstant |
createAbsoluteInstant()
Creates an
AbsoluteInstant without any value. |
AbsoluteInstant |
createAbsoluteInstant(Chronology chronology)
Creates an
AbsoluteInstant without any value and
using a chronology. |
AbsoluteInstant |
createAbsoluteInstant(int[] types,
int[] values)
Creates an
AbsoluteInstant with a set of types and an array of
values. |
AbsoluteInstant |
createAbsoluteInstant(int[] typess,
int[] values,
Chronology chronology)
Creates an
AbsoluteInstant with a set of types and an array of
values. |
AbsoluteInstant |
createAbsoluteInstant(int type,
int value)
Creates an
AbsoluteInstant with a type and a value. |
AbsoluteInstant |
createAbsoluteInstant(int type,
int value,
Chronology chronology)
Creates an
AbsoluteInstant with a type and a value and
using a chronology. |
AbsoluteInterval |
createAbsoluteInterval(AbsoluteInstant startInstant,
AbsoluteInstant endInstant)
Creates an
AbsoluteInterval from a start and an end
instants. |
AbsoluteInterval |
createAbsoluteInterval(AbsoluteInstant startInstant,
AbsoluteInstant endInstant,
Chronology chronology)
Creates an
AbsoluteInterval from a start and an end
instants and a chronology. |
AbsoluteInterval |
createAbsoluteInterval(AbsoluteInstant startAbsoluteInstant,
int years,
int months,
int weeks,
int days,
int hours,
int minutes,
int seconds,
int millis)
Creates an
AbsoluteInterval from a start instant and an increment
of the time fields. |
AbsoluteInterval |
createAbsoluteInterval(AbsoluteInstant startAbsoluteInstant,
int years,
int months,
int weeks,
int days,
int hours,
int minutes,
int seconds,
int millis,
Chronology chronology)
Creates an
AbsoluteInterval from a start instant and an increment
of the time fields and a chronology. |
AbsoluteInterval |
createAbsoluteInterval(int years,
int months,
int weeks,
int days,
int hours,
int minutes,
int seconds,
int millis)
Creates an
AbsoluteInterval from individual
fields. |
AbsoluteInterval |
createAbsoluteInterval(int years,
int months,
int weeks,
int days,
int hours,
int minutes,
int seconds,
int millis,
Chronology chronology)
Creates an
AbsoluteInterval from individual
fields and a chronology. |
RelativeInstant |
createRelativeInstant(Chronology chronology)
Creates a
RelativeInstant using the current system time
and using a chronology. |
RelativeInstant |
createRelativeInstant(Date date)
Creates a
RelativeInstant using a Date . |
RelativeInstant |
createRelativeInstant(Date date,
Chronology chronology)
Creates a
RelativeInstant using a Date
and using a chronology. |
RelativeInstant |
createRelativeInstant(int year,
int monthOfYear,
int dayOfMonth,
int hourOfDay,
int minuteOfHour,
int secondOfMinute,
int millisOfSecond)
Creates a
RelativeInstant using the datetime field values. |
RelativeInstant |
createRelativeInstant(int year,
int monthOfYear,
int dayOfMonth,
int hourOfDay,
int minuteOfHour,
int secondOfMinute,
int millisOfSecond,
Chronology chronology)
Creates a
RelativeInstant using the datetime field values
and using a chronology. |
RelativeInstant |
createRelativeInstant(int year,
int monthOfYear,
int dayOfMonth,
int hourOfDay,
int minuteOfHour,
int secondOfMinute,
int millisOfSecond,
int chronology)
Creates a
RelativeInstant using the datetime field values
and using a chronology code. |
RelativeInstant |
createRelativeInstant(long instant)
Creates a
RelativeInstant using the number of milliseconds from
1970-01-01T00:00Z. |
RelativeInstant |
createRelativeInstant(long instant,
Chronology chronology)
Creates a
RelativeInstant using the number of milliseconds from
1970-01-01T00:00Z and using a chronology. |
RelativeInterval |
createRelativeInterval(long startInstant,
long endInstant)
Creates a
RelativeInterval from a start and an end
instants. |
RelativeInterval |
createRelativeInterval(long startInstant,
long endInstant,
Chronology chronology)
Creates a
RelativeInterval from a start and an end
instants, and using a chonology. |
RelativeInterval |
createRelativeInterval(RelativeInstant startDateTime,
RelativeInstant endDateTime)
Creates a
RelativeInterval from a start and an end
instants. |
TimeAnimation |
createTimeAnimation()
Creates a time animation object.
|
AbsoluteInstantType |
getAbsoluteInstantType(int type)
Gets an
AbsoluteInstantType by code. |
AbsoluteIntervalType |
getAbsoluteIntervalType(int type)
Gets an
AbsoluteIntervalType by code. |
Chronology |
getChronology(int typechronology)
Gets an
Chronology by code. |
RelativeInstant |
parseRelativeInstant(String relativeInstantString)
Creates a relative instant from a string.
|
void |
registerAbsoluteInstantType(AbsoluteInstantType absoluteInstantType)
Registers a new
AbsoluteInstantType that can be used in the
creation of an AbsoluteInstant . |
void |
registerAbsoluteIntervalType(AbsoluteIntervalType absoluteIntervalType)
Registers a new
AbsoluteIntervalType that can be used in the
creation of an AbsoluteInterval . |
void |
registerChronology(Chronology chronology)
Registers a new
Chronology that can be used in the
creation of any temporal object. |
void |
setDefaultChronology(int chronology)
Sets the default chronology.
|
void registerAbsoluteInstantType(AbsoluteInstantType absoluteInstantType)
AbsoluteInstantType
that can be used in the
creation of an AbsoluteInstant
.absoluteInstantType
- the AbsoluteInstantType to registerAbsoluteInstantType getAbsoluteInstantType(int type) throws AbsoluteInstantTypeNotRegisteredException
AbsoluteInstantType
by code.type
- the code of the AbsoluteInstantType
to retrieve.AbsoluteInstantType
with a concrete code.AbsoluteInstantTypeNotRegisteredException
- if the AbsoluteInstantType
doen's exist.void registerAbsoluteIntervalType(AbsoluteIntervalType absoluteIntervalType)
AbsoluteIntervalType
that can be used in the
creation of an AbsoluteInterval
.absoluteInstantType
- the AbsoluteIntervalType to registerAbsoluteIntervalType getAbsoluteIntervalType(int type) throws AbsoluteIntervalTypeNotRegisteredException
AbsoluteIntervalType
by code.type
- the code of the AbsoluteIntervalType
to retrieve.AbsoluteIntervalType
with a concrete code.AbsoluteIntervalTypeNotRegisteredException
- if the AbsoluteIntervalType
doen's exist.void registerChronology(Chronology chronology)
Chronology
that can be used in the
creation of any temporal object.chronology
- the chronology to registerChronology getChronology(int typechronology)
Chronology
by code.type
- the code of the Chronology
to retrieve.Chronology
with a concrete code.void setDefaultChronology(int chronology)
chronology
- the default chronology.RelativeInstant createRelativeInstant(long instant)
RelativeInstant
using the number of milliseconds from
1970-01-01T00:00Z. It uses the chronology defined by the
setDefaultChronology(int)
method.instant
- the milliseconds from 1970-01-01T00:00:00ZRelativeInstant createRelativeInstant(long instant, Chronology chronology)
RelativeInstant
using the number of milliseconds from
1970-01-01T00:00Z and using a chronology.instant
- the milliseconds from 1970-01-01T00:00:00Z.chronology
- the chronology.RelativeInstant createRelativeInstant(Date date)
RelativeInstant
using a Date
.
It uses the chronology defined by the
setDefaultChronology(int)
method.date
- the java.util.DateRelativeInstant createRelativeInstant(Date date, Chronology chronology)
RelativeInstant
using a Date
and using a chronology.date
- the java.util.Datechronology
- the chronology.RelativeInstant createRelativeInstant(Chronology chronology)
RelativeInstant
using the current system time
and using a chronology.date
- the java.util.Datechronology
- the chronology.RelativeInstant createRelativeInstant(int year, int monthOfYear, int dayOfMonth, int hourOfDay, int minuteOfHour, int secondOfMinute, int millisOfSecond)
RelativeInstant
using the datetime field values.
It uses the chronology defined by the
setDefaultChronology(int)
method.year
- the yearmonthOfYear
- the month of the yeardayOfMonth
- the day of the monthhourOfDay
- the hour of the dayminuteOfHour
- the minute of the hoursecondOfMinute
- the second of the minutemillisOfSecond
- the millisecond of the secondRelativeInstant createRelativeInstant(int year, int monthOfYear, int dayOfMonth, int hourOfDay, int minuteOfHour, int secondOfMinute, int millisOfSecond, Chronology chronology)
RelativeInstant
using the datetime field values
and using a chronology.year
- the yearmonthOfYear
- the month of the yeardayOfMonth
- the day of the monthhourOfDay
- the hour of the dayminuteOfHour
- the minute of the hoursecondOfMinute
- the second of the minutemillisOfSecond
- the millisecond of the secondchronology
- the chronology.RelativeInstant createRelativeInstant(int year, int monthOfYear, int dayOfMonth, int hourOfDay, int minuteOfHour, int secondOfMinute, int millisOfSecond, int chronology)
RelativeInstant
using the datetime field values
and using a chronology code.year
- the yearmonthOfYear
- the month of the yeardayOfMonth
- the day of the monthhourOfDay
- the hour of the dayminuteOfHour
- the minute of the hoursecondOfMinute
- the second of the minutemillisOfSecond
- the millisecond of the secondchronology
- the chronology code.AbsoluteInstant createAbsoluteInstant()
AbsoluteInstant
without any value.
It uses the chronology defined by the
setDefaultChronology(int)
method.AbsoluteInstant createAbsoluteInstant(Chronology chronology)
AbsoluteInstant
without any value and
using a chronology.chronology
- the chronology.AbsoluteInstant createAbsoluteInstant(int type, int value) throws AbsoluteInstantTypeNotRegisteredException
AbsoluteInstant
with a type and a value.
It uses the chronology defined by the
setDefaultChronology(int)
method.type
- the single type to create the instant. It has to be
one of the values specified in AbsoluteInstantType
.value
- the value of the field.AbsoluteInstantTypeNotRegisteredException
- if there is not an AbsoluteInstantType
with
this code.AbsoluteInstant createAbsoluteInstant(int type, int value, Chronology chronology) throws AbsoluteInstantTypeNotRegisteredException
AbsoluteInstant
with a type and a value and
using a chronology.type
- the single type to create the instant. It has to be
one of the values specified in AbsoluteInstantType
.value
- the value of the field.chronology
- the chronology.AbsoluteInstantTypeNotRegisteredException
- if there is not an AbsoluteInstantType
with
this code.AbsoluteInstant createAbsoluteInstant(int[] types, int[] values) throws AbsoluteInstantTypeNotRegisteredException
AbsoluteInstant
with a set of types and an array of
values. The length of both arrays has to be the same.
It uses the chronology defined by the
setDefaultChronology(int)
method.types
- the types to create the instant. All of them have to be
one of the values specified in AbsoluteInstantType
.values
- the values of every field.AbsoluteInstantTypeNotRegisteredException
- if there is not an AbsoluteInstantType
with
the codes.AbsoluteInstant createAbsoluteInstant(int[] typess, int[] values, Chronology chronology) throws AbsoluteInstantTypeNotRegisteredException
AbsoluteInstant
with a set of types and an array of
values. It uses a chronology. and the length of both arrays has to be the same.types
- the types to create the instant. All of them have to be
one of the values specified in AbsoluteInstantType
.values
- the values of every field.chronology
- the chronology.AbsoluteInstantTypeNotRegisteredException
- if there is not an AbsoluteInstantType
with
the codes.RelativeInterval createRelativeInterval(long startInstant, long endInstant)
RelativeInterval
from a start and an end
instants. It uses the chronology defined by the
setDefaultChronology(int)
method.startInstant
- start of this interval, as milliseconds from 1970-01-01T00:00:00Z.endInstant
- end of this interval, as milliseconds from 1970-01-01T00:00:00Z.IllegalArgumentException
- if the end is before the startRelativeInterval createRelativeInterval(long startInstant, long endInstant, Chronology chronology)
RelativeInterval
from a start and an end
instants, and using a chonology.startInstant
- start of this interval, as milliseconds from 1970-01-01T00:00:00Z.endInstant
- end of this interval, as milliseconds from 1970-01-01T00:00:00Z.chronology
- the chronology.IllegalArgumentException
- if the end is before the startRelativeInterval createRelativeInterval(RelativeInstant startDateTime, RelativeInstant endDateTime)
RelativeInterval
from a start and an end
instants. It uses the chronology defined by the
setDefaultChronology(int)
method.startInstant
- start of this interval, null means nowendInstant
- end of this interval, null means nowIllegalArgumentException
- if the end is before the startAbsoluteInterval createAbsoluteInterval(AbsoluteInstant startInstant, AbsoluteInstant endInstant) throws AbsoluteIntervalTypeNotRegisteredException
AbsoluteInterval
from a start and an end
instants. It uses the chronology defined by the
setDefaultChronology(int)
method.startInstant
- start of this interval, null means nowendInstant
- end of this interval, null means nowIllegalArgumentException
- if the end is before the startAbsoluteIntervalTypeNotRegisteredException
AbsoluteInterval createAbsoluteInterval(AbsoluteInstant startInstant, AbsoluteInstant endInstant, Chronology chronology) throws AbsoluteIntervalTypeNotRegisteredException
AbsoluteInterval
from a start and an end
instants and a chronology.startInstant
- start of this intervalendInstant
- end of this intervalchronology
- the chronology.IllegalArgumentException
- if the end is before the startAbsoluteIntervalTypeNotRegisteredException
- if there is not
the necessary AbsoluteIntervalType
.AbsoluteInterval createAbsoluteInterval(AbsoluteInstant startAbsoluteInstant, int years, int months, int weeks, int days, int hours, int minutes, int seconds, int millis) throws AbsoluteIntervalTypeNotRegisteredException
AbsoluteInterval
from a start instant and an increment
of the time fields. It uses the chronology defined by the
setDefaultChronology(int)
method.startAbsoluteInstant
- start of this intervalyears
- the years to increment the instant.months
- the months to increment the instant.weeks
- the weeks to increment the instant.days
- the days to increment the instant.hours
- the hours to increment the instant.minutes
- the minutes to increment the instant.seconds
- the seconds to increment the instant.millis
- the milliseconds to increment the instant.IllegalArgumentException
- if the end is before the startAbsoluteIntervalTypeNotRegisteredException
- if there is not
the necessary AbsoluteIntervalType
.AbsoluteInterval createAbsoluteInterval(AbsoluteInstant startAbsoluteInstant, int years, int months, int weeks, int days, int hours, int minutes, int seconds, int millis, Chronology chronology) throws AbsoluteIntervalTypeNotRegisteredException
AbsoluteInterval
from a start instant and an increment
of the time fields and a chronology. The seconds instant is defined by
all the individual fields.startAbsoluteInstant
- start of this intervalyears
- the years to increment the instant.months
- the months to increment the instant.weeks
- the weeks to increment the instant.days
- the days to increment the instant.hours
- the hours to increment the instant.minutes
- the minutes to increment the instant.seconds
- the seconds to increment the instant.millis
- the milliseconds to increment the instant.chronology
- the chronologyIllegalArgumentException
- if the end is before the startAbsoluteIntervalTypeNotRegisteredException
- if there is not
the necessary AbsoluteIntervalType
.AbsoluteInterval createAbsoluteInterval(int years, int months, int weeks, int days, int hours, int minutes, int seconds, int millis) throws AbsoluteIntervalTypeNotRegisteredException
AbsoluteInterval
from individual
fields. The start interval is the time 0.
It uses the chronology defined by the
setDefaultChronology(int)
method.years
- the years of the end instant.months
- the months of the end instant.weeks
- the weeks of the end instant.days
- the days of the end instant.hours
- the hours of the end instant.minutes
- the minutes of the end instant.seconds
- the seconds of the end instant.millis
- the milliseconds of the end instant.AbsoluteIntervalTypeNotRegisteredException
- if there is not
the necessary AbsoluteIntervalType
.AbsoluteInterval createAbsoluteInterval(int years, int months, int weeks, int days, int hours, int minutes, int seconds, int millis, Chronology chronology) throws AbsoluteIntervalTypeNotRegisteredException
AbsoluteInterval
from individual
fields and a chronology. The start interval is the time 0.years
- the years of the end instant.months
- the months of the end instant.weeks
- the weeks of the end instant.days
- the days of the end instant.hours
- the hours of the end instant.minutes
- the minutes of the end instant.seconds
- the seconds of the end instant.millis
- the milliseconds of the end instant.chronology
- the chronologyAbsoluteIntervalTypeNotRegisteredException
- if there is not
the necessary AbsoluteIntervalType
.void addRelativeInstantPattern(String relativeInstantPattern)
relativeInstantPattern
- the pattern tor parse the instantRelativeInstant parseRelativeInstant(String relativeInstantString)
addRelativeInstantPattern(String)
method.relativeInstantString
- the relative instant like a stringnull
.TimeAnimation createTimeAnimation()