public class StrictDateTimeField extends DelegatedDateTimeField
StrictDateTimeField is thread-safe and immutable.
StrictChronology
,
LenientDateTimeField
,
Serialized FormModifier | Constructor and Description |
---|---|
protected |
StrictDateTimeField(DateTimeField field) |
Modifier and Type | Method and Description |
---|---|
static DateTimeField |
getInstance(DateTimeField field)
Returns a strict version of the given field.
|
boolean |
isLenient()
Returns true if the set method is lenient.
|
long |
set(long instant,
int value)
Does a bounds check before setting the value.
|
add, add, add, addWrapField, addWrapField, addWrapPartial, get, getAsShortText, getAsShortText, getAsShortText, getAsShortText, getAsShortText, getAsText, getAsText, getAsText, getAsText, getAsText, getDifference, getDifferenceAsLong, getDurationField, getLeapAmount, getLeapDurationField, getMaximumShortTextLength, getMaximumTextLength, getMaximumValue, getMaximumValue, getMaximumValue, getMaximumValue, getMinimumValue, getMinimumValue, getMinimumValue, getMinimumValue, getName, getRangeDurationField, getType, getWrappedField, isLeap, isSupported, remainder, roundCeiling, roundFloor, roundHalfCeiling, roundHalfEven, roundHalfFloor, set, set, set, set, toString
protected StrictDateTimeField(DateTimeField field)
public static DateTimeField getInstance(DateTimeField field)
public final boolean isLenient()
DateTimeField
isLenient
in class DelegatedDateTimeField
public long set(long instant, int value)
set
in class DelegatedDateTimeField
instant
- the milliseconds from 1970-01-01T00:00:00Z to set invalue
- the value to set, in the units of the fieldIllegalArgumentException
- if the value is invalidCopyright © 2012 JBoss by Red Hat. All Rights Reserved.