Package com.helger.commons.text.display
Interface IHasDisplayText
- All Known Subinterfaces:
IHasDisplayTextWithArgs,IHasErrorText
- All Known Implementing Classes:
ConstantHasDisplayText,ConstantHasErrorText,DynamicHasErrorText,DynamicHasErrorTextWithArgs,ECountry,ECountryName,ECountrySubName,ELocaleName,HasDisplayTextWithArgs
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Base interface for objects that have a locale dependent display name.
- Author:
- Philip Helger
-
Method Summary
Modifier and TypeMethodDescriptiondefault IHasTextstatic Comparator<IHasDisplayText> getComparatorCollating(Locale aContentLocale, Locale aSortLocale) getDisplayText(Locale aContentLocale)
-
Method Details
-
getDisplayText
- Parameters:
aContentLocale- The locale to be used for resolving. May not benull.- Returns:
- The display text of the object in the given locale. May be
nullif the text could not be resolved in the passed locale.
-
getAsHasText
- Returns:
- this as an instance of
IHasText. - Since:
- 8.5.2
-
getComparatorCollating
@Nonnull static Comparator<IHasDisplayText> getComparatorCollating(@Nonnull Locale aContentLocale, @Nullable Locale aSortLocale)
-