|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.joda.time.DateTimeField
org.joda.time.field.DelegatedDateTimeField
org.joda.time.field.StrictDateTimeField
public class StrictDateTimeField
Converts a lenient DateTimeField into a strict one. By being strict, the set throws an IllegalArgumentException if the value is out of bounds.
StrictDateTimeField is thread-safe and immutable.
StrictChronology,
LenientDateTimeField,
Serialized Form| Constructor Summary | |
|---|---|
protected |
StrictDateTimeField(DateTimeField field)
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected StrictDateTimeField(DateTimeField field)
| Method Detail |
|---|
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 DelegatedDateTimeFieldinstant - the milliseconds from 1970-01-01T00:00:00Z to set invalue - the value to set, in the units of the field
IllegalArgumentException - if the value is invalid
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||