Package de.aristaflow.adept2.util.i18n
Class ResBundleMessages
java.lang.Object
de.aristaflow.adept2.util.i18n.ResBundleMessages
Simple class providing messages from a specific resource bundle.
-
Method Summary
Modifier and TypeMethodDescriptionbooleancontainsKey(String key) Gets whether thisMessagescontains the designated key.Gets the actual locale of this messages.getFormattedString(String key, Object... args) Gets the string for the designated key formatted usingFormat.format(Object).Gets the intended locale of the messages which is also used forMessageFormat.Gets the string for the designated key formatted usingString.format(String, Object...).iterator()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface de.aristaflow.adept2.util.i18n.Messages
subMessages
-
Method Details
-
getLocale
Description copied from interface:MessagesGets the intended locale of the messages which is also used forMessageFormat. -
getActualLocale
Description copied from interface:MessagesGets the actual locale of this messages. This may be a fallback of the intended locale.- Specified by:
getActualLocalein interfaceMessages- Returns:
- The actual locale of the messages .
-
containsKey
Description copied from interface:MessagesGets whether thisMessagescontains the designated key.- Specified by:
containsKeyin interfaceMessages- Parameters:
key- The key to check whether it exists in thisMessages.- Returns:
- Whether this
Messagescontains the designated key.
-
getString
Description copied from interface:MessagesGets the string for the designated key formatted usingString.format(String, Object...). If the key is not known, the key itself will be returned instead of throwing aMissingResoucreException.- Specified by:
getStringin interfaceMessages- Parameters:
key- The key of the localised string.args- The arguments forString.format(String, Object...). If this isnullor an empty array, formatting will be skipped.- Returns:
- The formatted string message for the designated key.
-
getFormattedString
Description copied from interface:MessagesGets the string for the designated key formatted usingFormat.format(Object). If the key is not known, the key itself will be returned instead of throwing aMissingResoucreException.- Specified by:
getFormattedStringin interfaceMessages- Parameters:
key- The key of the localised string.args- The arguments forFormat.format(Object).- Returns:
- The formatted string message for the designated key.
-
iterator
-