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 Comparator<ChronoEntity<?>>
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.
ChronoEntity.get(ChronoElement)| Modifier and Type | Method and Description |
|---|---|
int |
compare(ChronoEntity<?> o1,
ChronoEntity<?> 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.
|
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.
|
String |
name()
Returns the name which is unique within the context of a given
chronology.
|
equalsString 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.
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 "