Package org.joda.time
Class DurationFieldType.StandardDurationFieldType
java.lang.Object
org.joda.time.DurationFieldType
org.joda.time.DurationFieldType.StandardDurationFieldType
- All Implemented Interfaces:
Serializable
- Enclosing class:
DurationFieldType
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final byteThe ordinal of the standard field type, for switch statementsprivate static final longSerialization versionFields inherited from class org.joda.time.DurationFieldType
CENTURIES, CENTURIES_TYPE, DAYS, DAYS_TYPE, ERAS, ERAS_TYPE, HALFDAYS, HALFDAYS_TYPE, HOURS, HOURS_TYPE, MILLIS, MILLIS_TYPE, MINUTES, MINUTES_TYPE, MONTHS, MONTHS_TYPE, SECONDS, SECONDS_TYPE, WEEKS, WEEKS_TYPE, WEEKYEARS, WEEKYEARS_TYPE, YEARS, YEARS_TYPE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleangetField(Chronology chronology) Gets a suitable field for this type from the given Chronology.inthashCode()private ObjectEnsure a singleton is returned.
-
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
-
-
Constructor Details
-
StandardDurationFieldType
StandardDurationFieldType(String name, byte ordinal) Constructor.- Parameters:
name- the name to use
-
-
Method Details
-
equals
-
hashCode
public int hashCode() -
getField
Description copied from class:DurationFieldTypeGets a suitable field for this type from the given Chronology.- Specified by:
getFieldin classDurationFieldType- 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
-