Package | Description |
---|---|
org.joda.time |
Provides support for dates, times, time zones, durations, intervals, and
partials.
|
org.joda.time.base |
Implementation package providing abstract and base time classes.
|
org.joda.time.field |
Implementation package providing abstract and standard field classes.
|
Modifier and Type | Class and Description |
---|---|
private static class |
DurationFieldType.StandardDurationFieldType |
Modifier and Type | Field and Description |
---|---|
(package private) static DurationFieldType |
DurationFieldType.CENTURIES_TYPE
The centuries field type.
|
(package private) static DurationFieldType |
DurationFieldType.DAYS_TYPE
The days field type.
|
(package private) static DurationFieldType |
DurationFieldType.ERAS_TYPE
The eras field type.
|
(package private) static DurationFieldType |
DurationFieldType.HALFDAYS_TYPE
The halfdays field type.
|
(package private) static DurationFieldType |
DurationFieldType.HOURS_TYPE
The hours field type.
|
private DurationFieldType |
IllegalFieldValueException.iDurationFieldType |
private DurationFieldType |
DateTimeFieldType.StandardDateTimeFieldType.iRangeType
The range duration of the field.
|
private DurationFieldType[] |
PeriodType.iTypes
The array of types
|
private DurationFieldType |
DateTimeFieldType.StandardDateTimeFieldType.iUnitType
The unit duration of the field.
|
(package private) static DurationFieldType |
DurationFieldType.MILLIS_TYPE
The millis field type.
|
(package private) static DurationFieldType |
DurationFieldType.MINUTES_TYPE
The minutes field type.
|
(package private) static DurationFieldType |
DurationFieldType.MONTHS_TYPE
The months field type.
|
(package private) static DurationFieldType |
DurationFieldType.SECONDS_TYPE
The seconds field type.
|
(package private) static DurationFieldType |
DurationFieldType.WEEKS_TYPE
The weeks field type.
|
(package private) static DurationFieldType |
DurationFieldType.WEEKYEARS_TYPE
The weekyears field type.
|
(package private) static DurationFieldType |
DurationFieldType.YEARS_TYPE
The years field type.
|
Modifier and Type | Field and Description |
---|---|
private static java.util.Set<DurationFieldType> |
LocalDate.DATE_DURATION_TYPES
Set of known duration types.
|
private static java.util.Set<DurationFieldType> |
LocalTime.TIME_DURATION_TYPES
Set of known duration types.
|
Modifier and Type | Method and Description |
---|---|
static DurationFieldType |
DurationFieldType.centuries()
Get the centuries field type.
|
static DurationFieldType |
DurationFieldType.days()
Get the days field type.
|
static DurationFieldType |
DurationFieldType.eras()
Get the eras field type.
|
DurationFieldType |
IllegalFieldValueException.getDurationFieldType()
Returns the DurationFieldType whose value was invalid, or null if not applicable.
|
abstract DurationFieldType |
DateTimeFieldType.getDurationType()
Get the duration unit of the field.
|
DurationFieldType |
DateTimeFieldType.StandardDateTimeFieldType.getDurationType() |
DurationFieldType |
Years.getFieldType()
Gets the duration field type, which is
years . |
DurationFieldType |
Seconds.getFieldType()
Gets the duration field type, which is
seconds . |
DurationFieldType |
Weeks.getFieldType()
Gets the duration field type, which is
weeks . |
DurationFieldType |
Minutes.getFieldType()
Gets the duration field type, which is
minutes . |
DurationFieldType |
Hours.getFieldType()
Gets the duration field type, which is
hours . |
DurationFieldType |
Days.getFieldType()
Gets the duration field type, which is
days . |
DurationFieldType |
Months.getFieldType()
Gets the duration field type, which is
months . |
DurationFieldType |
PeriodType.getFieldType(int index)
Gets the field type by index.
|
DurationFieldType |
ReadablePeriod.getFieldType(int index)
Gets the field type at the specified index.
|
abstract DurationFieldType |
DateTimeFieldType.getRangeDurationType()
Get the duration range of the field.
|
DurationFieldType |
DateTimeFieldType.StandardDateTimeFieldType.getRangeDurationType() |
abstract DurationFieldType |
DurationField.getType()
Get the type of the field.
|
static DurationFieldType |
DurationFieldType.halfdays()
Get the halfdays field type.
|
static DurationFieldType |
DurationFieldType.hours()
Get the hours field type.
|
static DurationFieldType |
DurationFieldType.millis()
Get the millis field type.
|
static DurationFieldType |
DurationFieldType.minutes()
Get the minutes field type.
|
static DurationFieldType |
DurationFieldType.months()
Get the months field type.
|
static DurationFieldType |
DurationFieldType.seconds()
Get the seconds field type.
|
static DurationFieldType |
DurationFieldType.weeks()
Get the weeks field type.
|
static DurationFieldType |
DurationFieldType.weekyears()
Get the weekyears field type.
|
static DurationFieldType |
DurationFieldType.years()
Get the years field type.
|
Modifier and Type | Method and Description |
---|---|
void |
ReadWritablePeriod.add(DurationFieldType field,
int value)
Adds to the value of one of the fields.
|
void |
MutableDateTime.add(DurationFieldType type,
int amount)
Adds to the instant specifying the duration and multiple to add.
|
void |
ReadWritableInstant.add(DurationFieldType type,
int amount)
Adds to the instant specifying the duration and multiple to add.
|
void |
MutablePeriod.add(DurationFieldType field,
int value)
Adds to the value of one of the fields.
|
static PeriodType |
PeriodType.forFields(DurationFieldType[] types)
Gets a period type that contains the duration types of the array.
|
int |
ReadablePeriod.get(DurationFieldType field)
Gets the value of one of the fields.
|
int |
PeriodType.indexOf(DurationFieldType type)
Gets the index of the field in this period.
|
boolean |
LocalTime.isSupported(DurationFieldType type)
Checks if the duration type specified is supported by this
local time and chronology.
|
boolean |
LocalDateTime.isSupported(DurationFieldType type)
Checks if the duration type specified is supported by this
local datetime and chronology.
|
boolean |
PeriodType.isSupported(DurationFieldType type)
Checks whether the field specified is supported by this period.
|
boolean |
LocalDate.isSupported(DurationFieldType type)
Checks if the duration type specified is supported by this
local date and chronology.
|
boolean |
ReadablePeriod.isSupported(DurationFieldType field)
Checks whether the field type specified is supported by this period.
|
void |
ReadWritablePeriod.set(DurationFieldType field,
int value)
Sets the value of one of the fields.
|
void |
MutablePeriod.set(DurationFieldType field,
int value)
Sets the value of one of the fields.
|
Period |
Period.withField(DurationFieldType field,
int value)
Creates a new Period instance with the specified field set to a new value.
|
TimeOfDay |
TimeOfDay.withFieldAdded(DurationFieldType fieldType,
int amount)
Deprecated.
Returns a copy of this time with the value of the specified field increased,
wrapping to what would be a new day if required.
|
LocalTime |
LocalTime.withFieldAdded(DurationFieldType fieldType,
int amount)
Returns a copy of this time with the value of the specified
field increased.
|
LocalDateTime |
LocalDateTime.withFieldAdded(DurationFieldType fieldType,
int amount)
Returns a copy of this datetime with the value of the specified
field increased.
|
LocalDate |
LocalDate.withFieldAdded(DurationFieldType fieldType,
int amount)
Returns a copy of this date with the value of the specified field increased.
|
MonthDay |
MonthDay.withFieldAdded(DurationFieldType fieldType,
int amount)
Returns a copy of this month-day with the value of the specified field increased.
|
DateMidnight |
DateMidnight.withFieldAdded(DurationFieldType fieldType,
int amount)
Deprecated.
Returns a copy of this date with the value of the specified field increased.
|
Period |
Period.withFieldAdded(DurationFieldType field,
int value)
Creates a new Period instance with the valueToAdd added to the specified field.
|
YearMonth |
YearMonth.withFieldAdded(DurationFieldType fieldType,
int amount)
Returns a copy of this year-month with the value of the specified field increased.
|
YearMonthDay |
YearMonthDay.withFieldAdded(DurationFieldType fieldType,
int amount)
Deprecated.
Returns a copy of this date with the value of the specified field increased.
|
Partial |
Partial.withFieldAdded(DurationFieldType fieldType,
int amount)
Gets a copy of this Partial with the value of the specified field increased.
|
DateTime |
DateTime.withFieldAdded(DurationFieldType fieldType,
int amount)
Returns a copy of this datetime with the value of the specified field increased.
|
Partial |
Partial.withFieldAddWrapped(DurationFieldType fieldType,
int amount)
Gets a copy of this Partial with the value of the specified field increased.
|
Constructor and Description |
---|
IllegalFieldValueException(DurationFieldType fieldType,
java.lang.Number value,
java.lang.Number lowerBound,
java.lang.Number upperBound)
Constructor.
|
IllegalFieldValueException(DurationFieldType fieldType,
java.lang.String value)
Constructor.
|
PeriodType(java.lang.String name,
DurationFieldType[] types,
int[] indices)
Constructor.
|
StandardDateTimeFieldType(java.lang.String name,
byte ordinal,
DurationFieldType unitType,
DurationFieldType rangeType)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
abstract DurationFieldType |
BaseSingleFieldPeriod.getFieldType()
Gets the single duration field type.
|
DurationFieldType |
AbstractPeriod.getFieldType(int index)
Gets the field type at the specified index.
|
DurationFieldType |
BaseSingleFieldPeriod.getFieldType(int index)
Gets the field type at the specified index.
|
DurationFieldType[] |
AbstractPeriod.getFieldTypes()
Gets an array of the field types that this period supports.
|
Modifier and Type | Method and Description |
---|---|
protected void |
BasePeriod.addField(DurationFieldType field,
int value)
Adds the value of a field in this period.
|
protected void |
BasePeriod.addFieldInto(int[] values,
DurationFieldType field,
int value)
Adds the value of a field in this period.
|
protected static int |
BaseSingleFieldPeriod.between(ReadableInstant start,
ReadableInstant end,
DurationFieldType field)
Calculates the number of whole units between the two specified datetimes.
|
private void |
BasePeriod.checkAndUpdate(DurationFieldType type,
int[] values,
int newValue)
Checks whether a field type is supported, and if so adds the new value
to the relevant index in the specified array.
|
int |
AbstractPeriod.get(DurationFieldType type)
Gets the value of one of the fields.
|
int |
BaseSingleFieldPeriod.get(DurationFieldType type)
Gets the value of a duration field represented by this period.
|
int |
AbstractPeriod.indexOf(DurationFieldType type)
Gets the index of the field in this period.
|
protected int |
AbstractPartial.indexOf(DurationFieldType type)
Gets the index of the first fields to have the specified duration,
or -1 if the field is unsupported.
|
protected int |
AbstractPartial.indexOfSupported(DurationFieldType type)
Gets the index of the first fields to have the specified duration,
throwing an exception if the field is unsupported.
|
boolean |
AbstractPeriod.isSupported(DurationFieldType type)
Checks whether the field specified is supported by this period.
|
boolean |
BaseSingleFieldPeriod.isSupported(DurationFieldType type)
Checks whether the duration field specified is supported by this period.
|
protected void |
BasePeriod.setField(DurationFieldType field,
int value)
Sets the value of a field in this period.
|
protected void |
BasePeriod.setFieldInto(int[] values,
DurationFieldType field,
int value)
Sets the value of a field in this period.
|
Modifier and Type | Field and Description |
---|---|
private DurationFieldType |
UnsupportedDurationField.iType
The name of the field
|
private DurationFieldType |
BaseDurationField.iType
A desriptive name for the field.
|
private DurationFieldType |
DelegatedDurationField.iType
The field type
|
Modifier and Type | Field and Description |
---|---|
private static java.util.HashMap<DurationFieldType,UnsupportedDurationField> |
UnsupportedDurationField.cCache
The cache of unsupported duration field instances
|
Modifier and Type | Method and Description |
---|---|
DurationFieldType |
UnsupportedDurationField.getType() |
DurationFieldType |
BaseDurationField.getType() |
DurationFieldType |
DelegatedDurationField.getType() |
DurationFieldType |
MillisDurationField.getType() |
Modifier and Type | Method and Description |
---|---|
static UnsupportedDurationField |
UnsupportedDurationField.getInstance(DurationFieldType type)
Gets an instance of UnsupportedDurationField for a specific named field.
|
Constructor and Description |
---|
BaseDurationField(DurationFieldType type) |
DecoratedDurationField(DurationField field,
DurationFieldType type)
Constructor.
|
DelegatedDurationField(DurationField field,
DurationFieldType type)
Constructor.
|
LinkedDurationField(DurationFieldType type) |
PreciseDurationField(DurationFieldType type,
long unitMillis)
Constructor.
|
ScaledDurationField(DurationField field,
DurationFieldType type,
int scalar)
Constructor
|
UnsupportedDurationField(DurationFieldType type)
Constructor.
|