Package org.joda.time.chrono
Class GJDayOfWeekDateTimeField
- java.lang.Object
-
- org.joda.time.DateTimeField
-
- org.joda.time.field.BaseDateTimeField
-
- org.joda.time.field.PreciseDurationDateTimeField
-
- org.joda.time.chrono.GJDayOfWeekDateTimeField
-
final class GJDayOfWeekDateTimeField extends PreciseDurationDateTimeField
GJDayOfWeekDateTimeField provides time calculations for the day of the week component of time.- Since:
- 1.0
-
-
Field Summary
Fields Modifier and Type Field Description private BasicChronologyiChronologyprivate static longserialVersionUIDSerialization version
-
Constructor Summary
Constructors Constructor Description GJDayOfWeekDateTimeField(BasicChronology chronology, DurationField days)Restricted constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected intconvertText(java.lang.String text, java.util.Locale locale)Convert the specified text and locale into a value.intget(long instant)Get the value of the specified time instant.java.lang.StringgetAsShortText(int fieldValue, java.util.Locale locale)Get the abbreviated textual value of the specified time instant.java.lang.StringgetAsText(int fieldValue, java.util.Locale locale)Get the textual value of the specified time instant.intgetMaximumShortTextLength(java.util.Locale locale)Get the maximum length of the abbreviated text returned by this field.intgetMaximumTextLength(java.util.Locale locale)Get the maximum length of the text returned by this field.intgetMaximumValue()Get the maximum value that this field can have.intgetMinimumValue()Get the minimum value that this field can have.DurationFieldgetRangeDurationField()Returns the range duration of this field.private java.lang.ObjectreadResolve()Serialization singleton-
Methods inherited from class org.joda.time.field.PreciseDurationDateTimeField
getDurationField, getMaximumValueForSet, getUnitMillis, isLenient, remainder, roundCeiling, roundFloor, set
-
Methods inherited from class org.joda.time.field.BaseDateTimeField
add, add, add, addWrapField, addWrapField, addWrapPartial, getAsShortText, getAsShortText, getAsShortText, getAsShortText, getAsText, getAsText, getAsText, getAsText, getDifference, getDifferenceAsLong, getLeapAmount, getLeapDurationField, getMaximumValue, getMaximumValue, getMaximumValue, getMinimumValue, getMinimumValue, getMinimumValue, getName, getType, isLeap, isSupported, roundHalfCeiling, roundHalfEven, roundHalfFloor, set, set, set, set, toString
-
Methods inherited from class org.joda.time.DateTimeField
setExtended
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
Serialization version- See Also:
- Constant Field Values
-
iChronology
private final BasicChronology iChronology
-
-
Constructor Detail
-
GJDayOfWeekDateTimeField
GJDayOfWeekDateTimeField(BasicChronology chronology, DurationField days)
Restricted constructor.
-
-
Method Detail
-
get
public int get(long instant)
Get the value of the specified time instant.- Specified by:
getin classBaseDateTimeField- Parameters:
instant- the time instant in millis to query- Returns:
- the day of the week extracted from the input
-
getAsText
public java.lang.String getAsText(int fieldValue, java.util.Locale locale)Get the textual value of the specified time instant.- Overrides:
getAsTextin classBaseDateTimeField- Parameters:
fieldValue- the field value to querylocale- the locale to use- Returns:
- the day of the week, such as 'Monday'
-
getAsShortText
public java.lang.String getAsShortText(int fieldValue, java.util.Locale locale)Get the abbreviated textual value of the specified time instant.- Overrides:
getAsShortTextin classBaseDateTimeField- Parameters:
fieldValue- the field value to querylocale- the locale to use- Returns:
- the day of the week, such as 'Mon'
-
convertText
protected int convertText(java.lang.String text, java.util.Locale locale)Convert the specified text and locale into a value.- Overrides:
convertTextin classBaseDateTimeField- Parameters:
text- the text to convertlocale- the locale to convert using- Returns:
- the value extracted from the text
- Throws:
java.lang.IllegalArgumentException- if the text is invalid
-
getRangeDurationField
public DurationField getRangeDurationField()
Description copied from class:BaseDateTimeFieldReturns the range duration of this field. For example, if this field represents "hour of day", then the range duration is a day.- Specified by:
getRangeDurationFieldin classBaseDateTimeField- Returns:
- the range duration of this field, or null if field has no range
-
getMinimumValue
public int getMinimumValue()
Get the minimum value that this field can have.- Overrides:
getMinimumValuein classPreciseDurationDateTimeField- Returns:
- the field's minimum value
-
getMaximumValue
public int getMaximumValue()
Get the maximum value that this field can have.- Specified by:
getMaximumValuein classBaseDateTimeField- Returns:
- the field's maximum value
-
getMaximumTextLength
public int getMaximumTextLength(java.util.Locale locale)
Get the maximum length of the text returned by this field.- Overrides:
getMaximumTextLengthin classBaseDateTimeField- Parameters:
locale- the locale to use- Returns:
- the maximum textual length
-
getMaximumShortTextLength
public int getMaximumShortTextLength(java.util.Locale locale)
Get the maximum length of the abbreviated text returned by this field.- Overrides:
getMaximumShortTextLengthin classBaseDateTimeField- Parameters:
locale- the locale to use- Returns:
- the maximum abbreviated textual length
-
readResolve
private java.lang.Object readResolve()
Serialization singleton
-
-