public abstract class DisplayElement<V extends Comparable<V>> extends BasicElement<V>
Standard element which offers localized names for display purposes (in most cases).
The implementation looks up the CLDR format symbol of the element and then associate it with the suitable i18n-resources. Supported symbols are: G (era), u/y/Y (year), Q (quarter), M (month), d (day-of-month), E (weekday), h/H/k/K (hour), m (minute), s (second).
| Modifier and Type | Method and Description |
|---|---|
String |
getDisplayName(Locale language)
Obtains a localized name for display purposes if possible.
|
compare, equals, getSymbol, hashCode, isLenient, isLocal, name, toStringgetDefaultMaximum, getDefaultMinimum, getType, isDateElement, isTimeElementcomparing, comparing, comparingDouble, comparingInt, comparingLong, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLongpublic String getDisplayName(Locale language)
ChronoElementObtains a localized name for display purposes if possible.
Most elements have no localized names, but in case the i18n-module is loaded then elements like eras, years, quarters, months, weeks, day-of-month, day-of-week, am/pm, hour, minute and second do have localization support. The default implementation falls back to the technical element name.
Note that the displayed name does not need to be unique for different elements. For example the
localized names of PlainDate.MONTH_OF_YEAR and PlainDate.MONTH_AS_NUMBER are equal.
language - language settinga technical name will be chosenCopyright © 2014–2017. All rights reserved.