Package org.apache.struts.faces.util
Class MessagesMap
java.lang.Object
org.apache.struts.faces.util.MessagesMap
A limited immutable
Map implementation that wraps the
MessageResources instance for the specified Locale.
Exposing the messages as a Map makes them easily accessible
via value binding expressions, as well as JSP 2.0 expression
language expressions.-
Nested Class Summary
-
Constructor Summary
ConstructorsConstructorDescriptionMessagesMap(MessageResources messages, Locale locale) Construct a newMessagesMapinstance that wraps the specifiedMessageResourcesinstance, and returns messages for the specifiedLocale. -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Theclear()method is not supported.booleancontainsKey(Object key) Returntrueif there is a message for the specified key.booleancontainsValue(Object value) ThecontainsValue()method is not supported.entrySet()TheentrySet()method is not supported.booleanTheequalsmethod checks whether equalMessageResourcesandLocaleare being wrapped.Return the message string for the specified key.inthashCode()ThehashCode()method returns values that will be identical if theequalsmethod returnstrue.booleanisEmpty()TheisEmpty()method returnsfalse, on the assumption that there is always at least one message available.keySet()ThekeySet()method is not supported.Theput()method is not supported.voidTheputAll()method is not supported.Theremove()method is not supported.intsize()Thesize()method is not supported.values()Thevalues()method is not supported.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
MessagesMap
Construct a newMessagesMapinstance that wraps the specifiedMessageResourcesinstance, and returns messages for the specifiedLocale.- Parameters:
messages-MessageResourcesinstance to wraplocale-Localefor which to retrieve messages, ornullfor the system defaultLocale- Throws:
NullPointerException- ifmessagesisnull
-
-
Method Details
-
clear
public void clear()Theclear()method is not supported. -
containsKey
Returntrueif there is a message for the specified key.- Specified by:
containsKeyin interfaceMap<String,String> - Parameters:
key- Message key to evaluate
-
containsValue
ThecontainsValue()method is not supported.- Specified by:
containsValuein interfaceMap<String,String> - Parameters:
value- Value to evaluate
-
entrySet
TheentrySet()method is not supported. -
equals
Theequalsmethod checks whether equalMessageResourcesandLocaleare being wrapped. -
get
Return the message string for the specified key. -
hashCode
public int hashCode()ThehashCode()method returns values that will be identical if theequalsmethod returnstrue. -
isEmpty
public boolean isEmpty()TheisEmpty()method returnsfalse, on the assumption that there is always at least one message available. -
keySet
ThekeySet()method is not supported. -
put
Theput()method is not supported. -
putAll
TheputAll()method is not supported. -
remove
Theremove()method is not supported. -
size
public int size()Thesize()method is not supported. -
values
Thevalues()method is not supported.
-