java.lang.Object | ||
↳ | org.joda.time.field.AbstractReadableInstantFieldProperty | |
↳ | org.joda.time.MutableDateTime.Property |
MutableDateTime.Property binds a MutableDateTime to a DateTimeField allowing powerful datetime functionality to be easily accessed.
The example below shows how to use the property to change the value of a MutableDateTime object.
MutableDateTime dt = new MutableDateTime(1972, 12, 3, 13, 32, 19, 123); dt.year().add(20); dt.second().roundFloor().minute().set(10);
MutableDateTime.Propery itself is thread-safe and immutable, but the MutableDateTime being operated on is not.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Adds a value to the millis value.
| |||||||||||
Adds a value to the millis value.
| |||||||||||
Adds a value, possibly wrapped, to the millis value.
| |||||||||||
Gets the field being used.
| |||||||||||
Gets the mutable datetime being used.
| |||||||||||
Round to the highest whole unit of this field.
| |||||||||||
Round to the lowest whole unit of this field.
| |||||||||||
Round to the nearest whole unit of this field, favoring the ceiling if
halfway.
| |||||||||||
Round to the nearest whole unit of this field.
| |||||||||||
Round to the nearest whole unit of this field, favoring the floor if
halfway.
| |||||||||||
Sets a text value.
| |||||||||||
Sets a text value.
| |||||||||||
Sets a value.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Gets the chronology of the datetime that this property is linked to.
| |||||||||||
Gets the milliseconds of the datetime that this property is linked to.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.joda.time.field.AbstractReadableInstantFieldProperty
| |||||||||||
From class
java.lang.Object
|
Adds a value to the millis value.
value | the value to add |
---|
Adds a value to the millis value.
value | the value to add |
---|
Adds a value, possibly wrapped, to the millis value.
value | the value to add |
---|
Gets the mutable datetime being used.
Round to the highest whole unit of this field.
Round to the lowest whole unit of this field.
Round to the nearest whole unit of this field, favoring the ceiling if halfway.
Round to the nearest whole unit of this field. If halfway, the ceiling is favored over the floor only if it makes this field's value even.
Round to the nearest whole unit of this field, favoring the floor if halfway.
Sets a text value.
text | the text value to set |
---|---|
locale | optional locale to use for selecting a text symbol |
IllegalArgumentException | if the text value isn't valid |
---|
Sets a text value.
text | the text value to set |
---|
IllegalArgumentException | if the text value isn't valid |
---|
Sets a value.
value | the value to set. |
---|
Gets the chronology of the datetime that this property is linked to.
Gets the milliseconds of the datetime that this property is linked to.