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.
@FunctionalInterface public interface IHasDisplayText
Base interface for objects that have a locale dependent display name.- Author:
- Philip Helger
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default IHasTextgetAsHasText()static Comparator<IHasDisplayText>getComparatorCollating(Locale aContentLocale, Locale aSortLocale)StringgetDisplayText(Locale aContentLocale)
-
-
-
Method Detail
-
getDisplayText
@Nullable String getDisplayText(@Nonnull Locale aContentLocale)
- 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
@Nonnull default IHasText getAsHasText()
- Returns:
- this as an instance of
IHasText. - Since:
- 8.5.2
-
getComparatorCollating
@Nonnull static Comparator<IHasDisplayText> getComparatorCollating(@Nonnull Locale aContentLocale, @Nullable Locale aSortLocale)
-
-