@Deprecated public static class YearMonthDay.Property extends AbstractPartialFieldProperty implements java.io.Serializable
YearMonthDay
.
This class binds a YearMonthDay
to a DateTimeField
.
Modifier and Type | Method and Description |
---|---|
YearMonthDay |
addToCopy(int valueToAdd)
Deprecated.
Adds to the value of this field in a copy of this YearMonthDay.
|
YearMonthDay |
addWrapFieldToCopy(int valueToAdd)
Deprecated.
Adds to the value of this field in a copy of this YearMonthDay wrapping
within this field if the maximum value is reached.
|
int |
get()
Deprecated.
Gets the value of this field.
|
DateTimeField |
getField()
Deprecated.
Gets the field that this property uses.
|
YearMonthDay |
getYearMonthDay()
Deprecated.
Gets the partial that this property belongs to.
|
YearMonthDay |
setCopy(int value)
Deprecated.
Sets this field in a copy of the YearMonthDay.
|
YearMonthDay |
setCopy(java.lang.String text)
Deprecated.
Sets this field in a copy of the YearMonthDay to a parsed text value.
|
YearMonthDay |
setCopy(java.lang.String text,
java.util.Locale locale)
Deprecated.
Sets this field in a copy of the YearMonthDay to a parsed text value.
|
YearMonthDay |
withMaximumValue()
Deprecated.
Returns a new YearMonthDay with this field set to the maximum value
for this field.
|
YearMonthDay |
withMinimumValue()
Deprecated.
Returns a new YearMonthDay with this field set to the minimum value
for this field.
|
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
public YearMonthDay getYearMonthDay()
public int get()
get
in class AbstractPartialFieldProperty
public YearMonthDay 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.
If the result would be too large, beyond the maximum year, then an IllegalArgumentException is thrown.
The YearMonthDay 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 copyjava.lang.IllegalArgumentException
- if the value isn't validpublic YearMonthDay 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,
2004-12-20
addWrapField one month returns 2004-01-20
.
The YearMonthDay 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 copyjava.lang.IllegalArgumentException
- if the value isn't validpublic YearMonthDay setCopy(int value)
The YearMonthDay 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 tojava.lang.IllegalArgumentException
- if the value isn't validpublic YearMonthDay setCopy(java.lang.String text, java.util.Locale locale)
The YearMonthDay 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 symboljava.lang.IllegalArgumentException
- if the text value isn't validpublic YearMonthDay setCopy(java.lang.String text)
The YearMonthDay attached to this property is unchanged by this call. Instead, a new instance is returned.
text
- the text value to setjava.lang.IllegalArgumentException
- if the text value isn't validpublic YearMonthDay withMaximumValue()
This operation is useful for obtaining a DateTime on the last day of the month, as month lengths vary.
YearMonthDay lastDayOfMonth = dt.dayOfMonth().withMaximumValue();
The YearMonthDay attached to this property is unchanged by this call.
public YearMonthDay withMinimumValue()
The YearMonthDay attached to this property is unchanged by this call.
"Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"