public final class SkipUndoDateTimeField extends DelegatedDateTimeField
This reverses the effect of SkipDateTimeField. This isn't very elegant.
SkipUndoDateTimeField is thread-safe and immutable.
Constructor and Description |
---|
SkipUndoDateTimeField(Chronology chronology,
DateTimeField field)
Constructor that reinserts zero.
|
SkipUndoDateTimeField(Chronology chronology,
DateTimeField field,
int skip)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
get(long millis)
Get the value of this field from the milliseconds.
|
int |
getMinimumValue()
Get the minimum allowable value for this field.
|
long |
set(long millis,
int value)
Sets a value in the milliseconds supplied.
|
add, add, add, addWrapField, addWrapField, addWrapPartial, getAsShortText, getAsShortText, getAsShortText, getAsShortText, getAsShortText, getAsText, getAsText, getAsText, getAsText, getAsText, getDifference, getDifferenceAsLong, getDurationField, getLeapAmount, getLeapDurationField, getMaximumShortTextLength, getMaximumTextLength, getMaximumValue, getMaximumValue, getMaximumValue, getMaximumValue, getMinimumValue, getMinimumValue, getMinimumValue, getName, getRangeDurationField, getType, getWrappedField, isLeap, isLenient, isSupported, remainder, roundCeiling, roundFloor, roundHalfCeiling, roundHalfEven, roundHalfFloor, set, set, set, set, toString
setExtended
public SkipUndoDateTimeField(Chronology chronology, DateTimeField field)
chronology
- the chronoogy to usefield
- the field to skip zero onpublic SkipUndoDateTimeField(Chronology chronology, DateTimeField field, int skip)
chronology
- the chronoogy to usefield
- the field to skip zero onskip
- the value to skippublic int get(long millis)
DateTimeField
get
in class DelegatedDateTimeField
millis
- the milliseconds from 1970-01-01T00:00:00Z to querypublic long set(long millis, int value)
DateTimeField
The value of this field will be set. If the value is invalid, an exception if thrown.
If setting this field would make other fields invalid, then those fields may be changed. For example if the current date is the 31st January, and the month is set to February, the day would be invalid. Instead, the day would be changed to the closest value - the 28th/29th February as appropriate.
set
in class DelegatedDateTimeField
millis
- the milliseconds from 1970-01-01T00:00:00Z to set invalue
- the value to set, in the units of the fieldpublic int getMinimumValue()
DateTimeField
getMinimumValue
in class DelegatedDateTimeField
"Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"