Package org.joda.time
Class DateTimeFieldType.StandardDateTimeFieldType
- java.lang.Object
-
- org.joda.time.DateTimeFieldType
-
- org.joda.time.DateTimeFieldType.StandardDateTimeFieldType
-
- All Implemented Interfaces:
java.io.Serializable
- Enclosing class:
- DateTimeFieldType
private static class DateTimeFieldType.StandardDateTimeFieldType extends DateTimeFieldType
-
-
Field Summary
Fields Modifier and Type Field Description private byte
iOrdinal
The ordinal of the standard field type, for switch statementsprivate DurationFieldType
iRangeType
The range duration of the field.private DurationFieldType
iUnitType
The unit duration of the field.private static long
serialVersionUID
Serialization version-
Fields inherited from class org.joda.time.DateTimeFieldType
CENTURY_OF_ERA, CLOCKHOUR_OF_DAY, CLOCKHOUR_OF_HALFDAY, DAY_OF_MONTH, DAY_OF_WEEK, DAY_OF_YEAR, ERA, HALFDAY_OF_DAY, HOUR_OF_DAY, HOUR_OF_HALFDAY, MILLIS_OF_DAY, MILLIS_OF_SECOND, MINUTE_OF_DAY, MINUTE_OF_HOUR, MONTH_OF_YEAR, SECOND_OF_DAY, SECOND_OF_MINUTE, WEEK_OF_WEEKYEAR, WEEKYEAR, WEEKYEAR_OF_CENTURY, YEAR, YEAR_OF_CENTURY, YEAR_OF_ERA
-
-
Constructor Summary
Constructors Constructor Description StandardDateTimeFieldType(java.lang.String name, byte ordinal, DurationFieldType unitType, DurationFieldType rangeType)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
DurationFieldType
getDurationType()
Get the duration unit of the field.DateTimeField
getField(Chronology chronology)
Gets a suitable field for this type from the given Chronology.DurationFieldType
getRangeDurationType()
Get the duration range of the field.int
hashCode()
private java.lang.Object
readResolve()
Ensure a singleton is returned.-
Methods inherited from class org.joda.time.DateTimeFieldType
centuryOfEra, clockhourOfDay, clockhourOfHalfday, dayOfMonth, dayOfWeek, dayOfYear, era, getName, halfdayOfDay, hourOfDay, hourOfHalfday, isSupported, millisOfDay, millisOfSecond, minuteOfDay, minuteOfHour, monthOfYear, secondOfDay, secondOfMinute, toString, weekOfWeekyear, weekyear, weekyearOfCentury, year, yearOfCentury, yearOfEra
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
Serialization version- See Also:
- Constant Field Values
-
iOrdinal
private final byte iOrdinal
The ordinal of the standard field type, for switch statements
-
iUnitType
private final transient DurationFieldType iUnitType
The unit duration of the field.
-
iRangeType
private final transient DurationFieldType iRangeType
The range duration of the field.
-
-
Constructor Detail
-
StandardDateTimeFieldType
StandardDateTimeFieldType(java.lang.String name, byte ordinal, DurationFieldType unitType, DurationFieldType rangeType)
Constructor.- Parameters:
name
- the name to useordinal
- the byte value for the ordinal indexunitType
- the unit duration typerangeType
- the range duration type
-
-
Method Detail
-
getDurationType
public DurationFieldType getDurationType()
Description copied from class:DateTimeFieldType
Get the duration unit of the field.- Specified by:
getDurationType
in classDateTimeFieldType
- Returns:
- duration unit of the field, never null
-
getRangeDurationType
public DurationFieldType getRangeDurationType()
Description copied from class:DateTimeFieldType
Get the duration range of the field.- Specified by:
getRangeDurationType
in classDateTimeFieldType
- Returns:
- duration range of the field, null if unbounded
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
getField
public DateTimeField getField(Chronology chronology)
Description copied from class:DateTimeFieldType
Gets a suitable field for this type from the given Chronology.- Specified by:
getField
in classDateTimeFieldType
- Parameters:
chronology
- the chronology to use, null means ISOChronology in default zone- Returns:
- a suitable field
-
readResolve
private java.lang.Object readResolve()
Ensure a singleton is returned.- Returns:
- the singleton type
-
-