java.lang.Object | |
↳ | org.joda.time.field.AbstractReadableInstantFieldProperty |
Known Direct Subclasses |
AbstractReadableInstantFieldProperty is a base class for binding a ReadableInstant to a DateTimeField.
It allows the date and time manipulation code to be field based yet still easy to use.
AbstractReadableInstantFieldProperty itself is thread-safe and immutable, but the ReadableInstant being operated on may be mutable and not thread-safe.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Constructor.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Compare this field to the same field on another partial instant.
| |||||||||||
Compare this field to the same field on another instant.
| |||||||||||
Compares this property to another.
| |||||||||||
Gets the value of this property from the instant.
| |||||||||||
Gets the short textual value of this property from the instant as a
string in the default locale.
| |||||||||||
Gets the short textual value of this property from the instant as a
string in the specified locale.
| |||||||||||
Gets the value of this property from the instant as a string.
| |||||||||||
Gets the textual value of this property from the instant as a
string in the specified locale.
| |||||||||||
Gets the textual value of this property from the instant as a
string in the default locale.
| |||||||||||
Returns the difference between this field property instant and the one
passed in, in the units of this field.
| |||||||||||
Returns the difference between this field property instant and the one
passed in, in the units of this field.
| |||||||||||
Returns the duration per unit value of this field.
| |||||||||||
Gets the field being used.
| |||||||||||
Gets the field type being used.
| |||||||||||
Gets the amount by which this field is leap.
| |||||||||||
If this field were to leap, then it would be in units described by the
returned duration.
| |||||||||||
Gets the maximum short text length for the field.
| |||||||||||
Gets the maximum text length for the field.
| |||||||||||
Gets the maximum value for the field.
| |||||||||||
Gets the maximum value for the field ignoring the current time.
| |||||||||||
Gets the minimum value for the field.
| |||||||||||
Gets the minimum value for the field ignoring the current time.
| |||||||||||
Gets the name of the field.
| |||||||||||
Returns the range duration of this field.
| |||||||||||
Returns a hashcode compatible with the equals method.
| |||||||||||
Gets whether this field is leap.
| |||||||||||
Returns the fractional duration milliseconds of this field.
| |||||||||||
Returns the interval that represents the range of the minimum
and maximum values of this field.
| |||||||||||
Output a debugging string.
|
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
java.lang.Object
|
Constructor.
Compare this field to the same field on another partial instant.
The comparison is based on the value of the same field type, irrespective of any difference in chronology. Thus, if this property represents the hourOfDay field, then the hourOfDay field of the other partial will be queried whether in the same chronology or not.
partial | the partial to compare to |
---|
IllegalArgumentException | if the partial is null |
---|---|
IllegalArgumentException | if the partial doesn't support this field |
Compare this field to the same field on another instant.
The comparison is based on the value of the same field type, irrespective of any difference in chronology. Thus, if this property represents the hourOfDay field, then the hourOfDay field of the other instant will be queried whether in the same chronology or not.
instant | the instant to compare to |
---|
IllegalArgumentException | if the instant is null |
---|
Compares this property to another.
object | the object to compare to |
---|
Gets the value of this property from the instant.
For example, the following two lines of code are equivalent:
datetime.getDayOfMonth(); datetime.dayOfMonth().get();
Gets the short textual value of this property from the instant as a string in the default locale.
This method returns the value converted to a String
returning the appropriate textual description wherever possible.
Thus, a day of week of 1 would return 'Mon' in English.
Gets the short textual value of this property from the instant as a string in the specified locale.
This method returns the value converted to a String
returning the appropriate textual description wherever possible.
Thus, a day of week of 1 would return 'Mon' in English.
locale | locale to use for selecting a text symbol, null means default |
---|
Gets the value of this property from the instant as a string.
This method returns the value converted to a String
using Integer.toString
. This method does NOT return
textual descriptions such as 'Monday' or 'January'.
See getAsText()
and getAsShortText()
for those.
Gets the textual value of this property from the instant as a string in the specified locale.
This method returns the value converted to a String
returning the appropriate textual description wherever possible.
Thus, a day of week of 1 would return 'Monday' in English.
locale | locale to use for selecting a text symbol, null means default |
---|
Gets the textual value of this property from the instant as a string in the default locale.
This method returns the value converted to a String
returning the appropriate textual description wherever possible.
Thus, a day of week of 1 would return 'Monday' in English.
Returns the difference between this field property instant and the one passed in, in the units of this field. The sign of the difference matches that of compareTo. In other words, this field property's instant is the minuend.
instant | the subtrahend, null means now |
---|
Returns the difference between this field property instant and the one passed in, in the units of this field. The sign of the difference matches that of compareTo. In other words, this field property's instant is the minuend.
instant | the subtrahend, null means now |
---|
Returns the duration per unit value of this field. For example, if this field represents "hour of day", then the duration is an hour.
Gets the amount by which this field is leap.
If this field were to leap, then it would be in units described by the returned duration. If this field doesn't ever leap, null is returned.
Gets the maximum short text length for the field.
locale | optional locale to use for selecting a text symbol |
---|
Gets the maximum text length for the field.
locale | optional locale to use for selecting a text symbol |
---|
Gets the maximum value for the field ignoring the current time.
Gets the minimum value for the field ignoring the current time.
Returns the range duration of this field. For example, if this field represents "hour of day", then the range duration is a day.
Returns a hashcode compatible with the equals method.
Returns the fractional duration milliseconds of this field.
Returns the interval that represents the range of the minimum and maximum values of this field.
For example, datetime.monthOfYear().toInterval()
will return an interval over the whole month.
Gets the chronology of the datetime that this property is linked to.
This implementation throws UnsupportedOperationException, and must be implemented by subclasses to enable the equals() and hashCode() methods.
Gets the milliseconds of the datetime that this property is linked to.