V - generic type of element values, usually extending the interface
java.lang.Comparable (or it can be converted to any other
sortable form)public interface ChronoElement<V> extends java.util.Comparator<ChronoDisplay>
Represents a chronological element which refers to a partial value of the whole temporal value and mainly serves for formatting purposes (as a carrier of a chronological information).
Each chronological system knows a set of elements whose values compose the total temporal value, usually the associated time coordinates on a time axis. Each element can be associated with a value of type V. Normally this value is an integer or an enum. Examples are the hour on a clock or the month of a calendar date.
The associated values are often defined as continuum without any gaps as integer within a given value range. However, there is no guarantee for such a continuum, for example daylight-saving-jumps or hebrew leap months.
Specification: All implementations must be immutable and serializable.
ChronoEntity.get(ChronoElement)| Modifier and Type | Method and Description |
|---|---|
int |
compare(ChronoDisplay o1,
ChronoDisplay o2)
Applies an element-orientated sorting of any chronological
entities.
|
V |
getDefaultMaximum()
Returns the default maximum of this element which is not dependent
on the chronological context.
|
V |
getDefaultMinimum()
Returns the default minimum of this element which is not dependent
on the chronological context.
|
char |
getSymbol()
Defines the default format symbol which is used in format patterns
to refer to this element.
|
java.lang.Class<V> |
getType()
Yields the reified value type.
|
boolean |
isDateElement()
Queries if this element represents a calendar date element.
|
boolean |
isLenient()
Queries if setting of element values is performed in a lenient
way.
|
boolean |
isTimeElement()
Queries if this element represents a wall time element.
|
java.lang.String |
name()
Returns the name which is unique within the context of a given
chronology.
|
java.lang.String name()
Returns the name which is unique within the context of a given chronology.
The name can also serve as resource key together with the name of a chronology for a localized description.
java.lang.Class<V> getType()
Yields the reified value type.
char getSymbol()
Defines the default format symbol which is used in format patterns to refer to this element.
In most cases the symbol should closely match the symbol-mapping as defined by the CLDR-standard of unicode-organization. Is the element not designed for formatting using patterns then this method just yields the ASCII-char "