Package com.helger.commons.text
Interface IHasText
- All Known Subinterfaces:
IHasTextWithArgs,IMultilingualText,IMutableMultilingualText
- All Known Implementing Classes:
AbstractHasText,AbstractMapBasedMultilingualText,AbstractReadOnlyMapBasedMultilingualText,ConstantHasText,ConstantHasTextWithArgs,HasTextWithArgs,MultilingualText,ReadOnlyMultilingualText,ResourceBundleTextProvider
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Basic interface for object providing multilingual texts without arguments.
See also
IHasTextWithArgs for a derived interface with argument
handling.- Author:
- Philip Helger
-
Method Summary
Modifier and TypeMethodDescriptiondefault IHasDisplayTextstatic Comparator<IHasText> getComparatorCollating(Locale aContentLocale, Locale aSortLocale) Get the text specific for the passed locale.
-
Method Details
-
getText
Get the text specific for the passed locale. The implementation class MAY add locale-generalisation when resolving the text ("de_DE" => "de" => default).- Parameters:
aContentLocale- The locale to use. May not benull.- Returns:
nullif no text for the given locale was found.
-
getAsHasDisplayText
- Returns:
- this as an instance of
IHasDisplayText. - Since:
- 8.5.2
-
getComparatorCollating
-