Package org.joda.time
Class DateTimeFieldType.StandardDateTimeFieldType
java.lang.Object
org.joda.time.DateTimeFieldType
org.joda.time.DateTimeFieldType.StandardDateTimeFieldType
- All Implemented Interfaces:
Serializable
- Enclosing class:
DateTimeFieldType
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final byteThe ordinal of the standard field type, for switch statementsprivate final DurationFieldTypeThe range duration of the field.private final DurationFieldTypeThe unit duration of the field.private static final longSerialization versionFields 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
ConstructorsConstructorDescriptionStandardDateTimeFieldType(String name, byte ordinal, DurationFieldType unitType, DurationFieldType rangeType) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionbooleanGet the duration unit of the field.getField(Chronology chronology) Gets a suitable field for this type from the given Chronology.Get the duration range of the field.inthashCode()private ObjectEnsure 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 Details
-
serialVersionUID
private static final long serialVersionUIDSerialization version- See Also:
-
iOrdinal
private final byte iOrdinalThe ordinal of the standard field type, for switch statements -
iUnitType
The unit duration of the field. -
iRangeType
The range duration of the field.
-
-
Constructor Details
-
StandardDateTimeFieldType
StandardDateTimeFieldType(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 Details
-
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
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
-
hashCode
public int hashCode() -
getField
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
Ensure a singleton is returned.- Returns:
- the singleton type
-