Package org.joda.time.chrono
Class BasicChronology.HalfdayField
- java.lang.Object
-
- org.joda.time.DateTimeField
-
- org.joda.time.field.BaseDateTimeField
-
- org.joda.time.field.PreciseDurationDateTimeField
-
- org.joda.time.field.PreciseDateTimeField
-
- org.joda.time.chrono.BasicChronology.HalfdayField
-
- Enclosing class:
- BasicChronology
private static class BasicChronology.HalfdayField extends PreciseDateTimeField
-
-
Field Summary
Fields Modifier and Type Field Description private static long
serialVersionUID
-
Constructor Summary
Constructors Constructor Description HalfdayField()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getAsText(int fieldValue, java.util.Locale locale)
Get the human-readable, text value of this field from the field value.int
getMaximumTextLength(java.util.Locale locale)
Get the maximum text value for this field.long
set(long millis, java.lang.String text, java.util.Locale locale)
Sets a value in the milliseconds supplied from a human-readable, text value.-
Methods inherited from class org.joda.time.field.PreciseDateTimeField
addWrapField, get, getMaximumValue, getRange, getRangeDurationField, set
-
Methods inherited from class org.joda.time.field.PreciseDurationDateTimeField
getDurationField, getMaximumValueForSet, getMinimumValue, getUnitMillis, isLenient, remainder, roundCeiling, roundFloor
-
Methods inherited from class org.joda.time.field.BaseDateTimeField
add, add, add, addWrapField, addWrapPartial, convertText, getAsShortText, getAsShortText, getAsShortText, getAsShortText, getAsShortText, getAsText, getAsText, getAsText, getAsText, getDifference, getDifferenceAsLong, getLeapAmount, getLeapDurationField, getMaximumShortTextLength, getMaximumValue, getMaximumValue, getMaximumValue, getMinimumValue, getMinimumValue, getMinimumValue, getName, getType, isLeap, isSupported, roundHalfCeiling, roundHalfEven, roundHalfFloor, set, set, set, toString
-
Methods inherited from class org.joda.time.DateTimeField
setExtended
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
-
Method Detail
-
getAsText
public java.lang.String getAsText(int fieldValue, java.util.Locale locale)
Description copied from class:BaseDateTimeField
Get the human-readable, text value of this field from the field value. If the specified locale is null, the default locale is used.The default implementation returns Integer.toString(get(instant)).
Note: subclasses that override this method should also override getMaximumTextLength.
- Overrides:
getAsText
in classBaseDateTimeField
- Parameters:
fieldValue
- the numeric value to convert to textlocale
- the locale to use for selecting a text symbol, null for default- Returns:
- the text value of the field
-
set
public long set(long millis, java.lang.String text, java.util.Locale locale)
Description copied from class:BaseDateTimeField
Sets a value in the milliseconds supplied from a human-readable, text value. If the specified locale is null, the default locale is used.This implementation uses
convertText(String, Locale)
andBaseDateTimeField.set(long, int)
.Note: subclasses that override this method should also override getAsText.
- Overrides:
set
in classBaseDateTimeField
- Parameters:
millis
- the milliseconds from 1970-01-01T00:00:00Z to set intext
- the text value to setlocale
- the locale to use for selecting a text symbol, null for default- Returns:
- the updated milliseconds
-
getMaximumTextLength
public int getMaximumTextLength(java.util.Locale locale)
Description copied from class:BaseDateTimeField
Get the maximum text value for this field. The default implementation returns the equivalent of Integer.toString(getMaximumValue()).length().- Overrides:
getMaximumTextLength
in classBaseDateTimeField
- Parameters:
locale
- the locale to use for selecting a text symbol- Returns:
- the maximum text length
-
-