|
Joda Time API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--org.joda.time.format.DateTimeParserBucket
Allows fields to be saved in any order, but physically set in a consistent order.
| Constructor Summary | |
DateTimeParserBucket(long millis)
|
|
| Method Summary | |
long |
computeMillis()
Computes the parsed datetime by setting the saved fields. |
DateTimeZone |
getDateTimeZone()
Returns the time zone used by computeMillis, or null if an offset is used instead. |
long |
getOffset()
Returns the time zone offset used by computeMillis, unless getDateTimeZone doesn't return null. |
void |
saveField(DateTimeField field,
int value)
Saves a datetime field value. |
void |
saveField(DateTimeField field,
java.lang.String text,
java.util.Locale locale)
Saves a datetime field text value. |
java.lang.Object |
saveState()
Saves the state of this bucket, returning it in an opaque object. |
void |
setDateTimeZone(DateTimeZone zone)
Set a time zone to be used when computeMillis is called, which overrides any set time zone offset. |
void |
setOffset(int offset)
Set a time zone offset to be used when computeMillis is called, which overrides the time zone. |
boolean |
undoChanges(java.lang.Object savedState)
Undos any changes that were made to this bucket since the given state was saved. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public DateTimeParserBucket(long millis)
millis - the initial millis from 1970-01-01T00:00:00, local time| Method Detail |
public DateTimeZone getDateTimeZone()
public void setDateTimeZone(DateTimeZone zone)
zone - the date time zone to operate in, or null if UTCpublic long getOffset()
public void setOffset(int offset)
public void saveField(DateTimeField field,
int value)
public void saveField(DateTimeField field,
java.lang.String text,
java.util.Locale locale)
public java.lang.Object saveState()
public boolean undoChanges(java.lang.Object savedState)
The state object passed into this method is not lost, and it can be used later to revert to that state again.
savedState - opaque saved state, returned from saveState
public long computeMillis()
java.lang.IllegalArgumentException - if any field is out of range
|
Joda Time API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||