Package com.helger.commons.name
Interface IDisplayNameProvider<DATATYPE>
-
- Type Parameters:
DATATYPE- The data type to retrieve the display name from
- 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 IDisplayNameProvider<DATATYPE>
Interface for a handler the provides the locale independent name of an object.- Author:
- Philip Helger
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description static IDisplayNameProvider<IHasDisplayName>createHasDisplayName()default Comparator<DATATYPE>getComparatorCollating(Locale aSortLocale)StringgetDisplayName(DATATYPE aObject)Get the name of the passed object.
-
-
-
Method Detail
-
getDisplayName
@Nullable String getDisplayName(@Nullable DATATYPE aObject)
Get the name of the passed object.- Parameters:
aObject- The object who's name is to be retrieved.- Returns:
- The name of the object. May be
null.
-
getComparatorCollating
@Nonnull default Comparator<DATATYPE> getComparatorCollating(@Nullable Locale aSortLocale)
-
createHasDisplayName
@Nonnull static IDisplayNameProvider<IHasDisplayName> createHasDisplayName()
-
-