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 byteiOrdinalThe ordinal of the standard field type, for switch statementsprivate DurationFieldTypeiRangeTypeThe range duration of the field.private DurationFieldTypeiUnitTypeThe unit duration of the field.private static longserialVersionUIDSerialization 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 booleanequals(java.lang.Object obj)DurationFieldTypegetDurationType()Get the duration unit of the field.DateTimeFieldgetField(Chronology chronology)Gets a suitable field for this type from the given Chronology.DurationFieldTypegetRangeDurationType()Get the duration range of the field.inthashCode()private java.lang.ObjectreadResolve()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:DateTimeFieldTypeGet the duration unit of the field.- Specified by:
getDurationTypein classDateTimeFieldType- Returns:
- duration unit of the field, never null
-
getRangeDurationType
public DurationFieldType getRangeDurationType()
Description copied from class:DateTimeFieldTypeGet the duration range of the field.- Specified by:
getRangeDurationTypein classDateTimeFieldType- Returns:
- duration range of the field, null if unbounded
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
getField
public DateTimeField getField(Chronology chronology)
Description copied from class:DateTimeFieldTypeGets a suitable field for this type from the given Chronology.- Specified by:
getFieldin 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
-
-