|
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.DateTimeFieldProperty
|
+--org.joda.time.MutableDateTimeFieldProperty
MutableDateTimeFieldProperty binds a ReadWritableInstant to a DateTimeField.
MutableDateTimeFieldProperty allows the date and time manipulation code to be field based yet still easy to use.
ReadWritableInstant,
DateTimeField,
Serialized Form| Constructor Summary | |
MutableDateTimeFieldProperty(ReadWritableInstant instant,
DateTimeField field)
Constructor. |
|
| Method Summary | |
void |
add(int value)
Adds a value to the millis value. |
void |
add(long value)
Adds a value to the millis value. |
void |
addWrapped(int value)
Adds a value, possibly wrapped, to the millis value. |
void |
remainder()
Retains only the fractional units of this field. |
void |
roundCeiling()
Round to the highest whole unit of this field. |
void |
roundFloor()
Round to the lowest whole unit of this field. |
void |
roundHalfCeiling()
Round to the nearest whole unit of this field, favoring the ceiling if halfway. |
void |
roundHalfEven()
Round to the nearest whole unit of this field. |
void |
roundHalfFloor()
Round to the nearest whole unit of this field, favoring the floor if halfway. |
void |
set(int value)
Sets a value. |
void |
set(java.lang.String text)
Sets a text value. |
void |
set(java.lang.String text,
java.util.Locale locale)
Sets a text value. |
| Methods inherited from class org.joda.time.DateTimeFieldProperty |
compareTo, get, getAsShortText, getAsShortText, getAsText, getAsText, getDifference, getField, getInstant, getLeapAmount, getMaximumShortTextLength, getMaximumTextLength, getMaximumValue, getMaximumValueOverall, getMinimumValue, getMinimumValueOverall, getName, getRangeMillis, getUnitMillis, isLeap, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public MutableDateTimeFieldProperty(ReadWritableInstant instant,
DateTimeField field)
instant - the instant to setfield - the field to use| Method Detail |
public void add(int value)
value - the value to add.DateTimeField.add(long,int)public void add(long value)
value - the value to add.DateTimeField.add(long,long)public void addWrapped(int value)
value - the value to add.DateTimeField.addWrapped(long, int)public void set(int value)
value - the value to set.DateTimeField.set(long,int)
public void set(java.lang.String text,
java.util.Locale locale)
text - the text value to setlocale - optional locale to use for selecting a text symbol
java.lang.IllegalArgumentException - if the text value isn't validDateTimeField.set(long,java.lang.String,java.util.Locale)public final void set(java.lang.String text)
text - the text value to set
java.lang.IllegalArgumentException - if the text value isn't validDateTimeField.set(long,java.lang.String)public void roundFloor()
DateTimeField.roundFloor(long)public void roundCeiling()
DateTimeField.roundCeiling(long)public void roundHalfFloor()
DateTimeField.roundHalfFloor(long)public void roundHalfCeiling()
DateTimeField.roundHalfCeiling(long)public void roundHalfEven()
DateTimeField.roundHalfEven(long)public void remainder()
DateTimeField.remainder(long)
|
Joda Time API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||