Interface ChronoElement<V>
- Type Parameters:
V
- generic type of element values, usually extending the interfacejava.lang.Comparable
(or it can be converted to any other sortable form)
- All Superinterfaces:
Comparator<ChronoDisplay>
- All Known Subinterfaces:
AdjustableElement<V,T>
,AdjustableTextElement<V>
,CalendarDateElement
,NavigableElement<V>
,NumericalElement<V>
,OrdinalWeekdayElement<T>
,OrdinalWeekdayElement
,ProportionalElement<V,T>
,StdCalendarElement<V,T>
,TextElement<V>
,WallTimeElement
,ZonalElement<V>
- All Known Implementing Classes:
BasicElement
,DisplayElement
,EpochDays
,FlagElement
,ValidationElement
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.
Note: All implementations must be immutable and serializable.
- Author:
- Meno Hochschild
- See Also:
ChronoEntity.get(ChronoElement)
-
Method Summary
Modifier and TypeMethodDescriptionint
compare(ChronoDisplay o1, ChronoDisplay o2)
Applies an element-orientated sorting of any chronological entities.Returns the default maximum of this element which is not dependent on the chronological context.Returns the default minimum of this element which is not dependent on the chronological context.default String
getDisplayName(Locale language)
Obtains a localized name for display purposes if possible.char
Defines the default format symbol which is used in format patterns to refer to this element.getType()
Yields the reified value type.boolean
Queries if this element represents a calendar date element.boolean
Queries if setting of element values is performed in a lenient way.boolean
Queries if this element represents a wall time element.name()
Returns the name which is unique within the context of a given chronology.Methods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Method Details
-
name
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.
- Returns:
- name of element, unique within a chronology
-
getType
Yields the reified value type.
- Returns:
- type of associated values
-
getSymbol
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 "
-