public static class MonthDay.Property extends AbstractPartialFieldProperty implements Serializable
MonthDay
.
This class binds a YearMonth
to a DateTimeField
.
Modifier and Type | Method and Description |
---|---|
MonthDay |
addToCopy(int valueToAdd)
Adds to the value of this field in a copy of this MonthDay.
|
MonthDay |
addWrapFieldToCopy(int valueToAdd)
Adds to the value of this field in a copy of this MonthDay wrapping
within this field if the maximum value is reached.
|
int |
get()
Gets the value of this field.
|
DateTimeField |
getField()
Gets the field that this property uses.
|
MonthDay |
getMonthDay()
Gets the partial that this property belongs to.
|
protected ReadablePartial |
getReadablePartial()
Gets the partial that this property belongs to.
|
MonthDay |
setCopy(int value)
Sets this field in a copy of the MonthDay.
|
MonthDay |
setCopy(String text)
Sets this field in a copy of the MonthDay to a parsed text value.
|
MonthDay |
setCopy(String text,
Locale locale)
Sets this field in a copy of the MonthDay to a parsed text value.
|
compareTo, compareTo, equals, getAsShortText, getAsShortText, getAsString, getAsText, getAsText, getDurationField, getFieldType, getMaximumShortTextLength, getMaximumTextLength, getMaximumValue, getMaximumValueOverall, getMinimumValue, getMinimumValueOverall, getName, getRangeDurationField, hashCode, toString
public DateTimeField getField()
getField
in class AbstractPartialFieldProperty
protected ReadablePartial getReadablePartial()
getReadablePartial
in class AbstractPartialFieldProperty
public MonthDay getMonthDay()
public int get()
get
in class AbstractPartialFieldProperty
public MonthDay addToCopy(int valueToAdd)
The value will be added to this field. If the value is too large to be added solely to this field then it will affect larger fields. Smaller fields are unaffected.
The MonthDay attached to this property is unchanged by this call. Instead, a new instance is returned.
valueToAdd
- the value to add to the field in the copyIllegalArgumentException
- if the value isn't validpublic MonthDay addWrapFieldToCopy(int valueToAdd)
The value will be added to this field. If the value is too large to be added solely to this field then it wraps within this field. Other fields are unaffected.
For example,
--12-30
addWrapField one month returns --01-30
.
The MonthDay attached to this property is unchanged by this call. Instead, a new instance is returned.
valueToAdd
- the value to add to the field in the copyIllegalArgumentException
- if the value isn't validpublic MonthDay setCopy(int value)
The MonthDay attached to this property is unchanged by this call. Instead, a new instance is returned.
value
- the value to set the field in the copy toIllegalArgumentException
- if the value isn't validpublic MonthDay setCopy(String text, Locale locale)
The MonthDay attached to this property is unchanged by this call. Instead, a new instance is returned.
text
- the text value to setlocale
- optional locale to use for selecting a text symbolIllegalArgumentException
- if the text value isn't validpublic MonthDay setCopy(String text)
The MonthDay attached to this property is unchanged by this call. Instead, a new instance is returned.
text
- the text value to setIllegalArgumentException
- if the text value isn't validCopyright © 2002–2024 Joda.org. All rights reserved.