Interface CaptionMap
- All Known Implementing Classes:
DummyCaptionMap
,LocalizedCaptionMap
,PerUserLocaleCaptionMap
public interface CaptionMap
Map containing mappings between
captions
and
components
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescription@NonNull Set<TranslatableCaption>
Gets a copy of the set of captions stored in the CaptionMap@NonNull Locale
Get the locale of the messages stored in the map@NonNull String
getMessage(@NonNull TranslatableCaption caption)
Get a message using the server locale@NonNull String
getMessage(@NonNull TranslatableCaption caption, @NonNull LocaleHolder localeHolder)
Get a message using a specific localeboolean
supportsLocale(@NonNull Locale locale)
Check if the map supports a given locale
-
Method Details
-
supportsLocale
Check if the map supports a given locale- Parameters:
locale
- Locale- Returns:
- True if the map supports the locale
-
getLocale
@NonNull Locale getLocale()Get the locale of the messages stored in the map- Returns:
- Message locale
-
getCaptions
@NonNull Set<TranslatableCaption> getCaptions()Gets a copy of the set of captions stored in the CaptionMap- Returns:
- An immutable set of TranslatableCaption