Interface Description
- All Known Subinterfaces:
Option
public interface Description
Description container interface for providing language dependent descriptions.
- Since:
- 5.2.260802
-
Method Summary
Modifier and TypeMethodDescriptiondefault @Nullable StringgetDescription(@NonNull Language language) Get the description for the specified language.default @Nullable StringgetDescription(@NonNull String lang) Convenience method to get a description based on a language abbreviation.
-
Method Details
-
getDescription
@ApiDoc(comment="Get the description for the specified language, or null if no description is configured.", since="5.2.260802") default @Nullable String getDescription(@NonNull Language language) Get the description for the specified language.The lookup follows the same fallback order as
Label.getLabel(Language): the description for the specified language is returned first; if absent, the description for thefallback languageis returned. Returnsnullwhen no description has been configured.- Parameters:
language- The language to look up.- Returns:
- The description, or
nullif not available. - Since:
- 5.2.260802
-
getDescription
@ApiDoc(comment="Convenience method to get a description based on a language abbreviation.", since="5.2.260802") default @Nullable String getDescription(@NonNull String lang) Convenience method to get a description based on a language abbreviation.- Parameters:
lang- The language abbreviation.- Returns:
- The description, or
nullif not available. - Since:
- 5.2.260802
- See Also:
-