Package org.joda.time
Class DurationFieldType.StandardDurationFieldType
- java.lang.Object
-
- org.joda.time.DurationFieldType
-
- org.joda.time.DurationFieldType.StandardDurationFieldType
-
- All Implemented Interfaces:
java.io.Serializable
- Enclosing class:
- DurationFieldType
private static class DurationFieldType.StandardDurationFieldType extends DurationFieldType
-
-
Field Summary
Fields Modifier and Type Field Description private byteiOrdinalThe ordinal of the standard field type, for switch statementsprivate static longserialVersionUIDSerialization version-
Fields 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 Constructor Description StandardDurationFieldType(java.lang.String name, byte ordinal)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)DurationFieldgetField(Chronology chronology)Gets a suitable field for this type from the given Chronology.inthashCode()private java.lang.ObjectreadResolve()Ensure a singleton is returned.
-
-
-
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
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
getField
public DurationField getField(Chronology chronology)
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
private java.lang.Object readResolve()
Ensure a singleton is returned.- Returns:
- the singleton type
-
-