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
ConstructorDescriptionMessagesMap
(MessageResources messages, Locale locale) Construct a newMessagesMap
instance that wraps the specifiedMessageResources
instance, and returns messages for the specifiedLocale
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
Theclear()
method is not supported.boolean
containsKey
(Object key) Returntrue
if there is a message for the specified key.boolean
containsValue
(Object value) ThecontainsValue()
method is not supported.entrySet()
TheentrySet()
method is not supported.boolean
Theequals
method checks whether equalMessageResources
andLocale
are being wrapped.Return the message string for the specified key.int
hashCode()
ThehashCode()
method returns values that will be identical if theequals
method returnstrue
.boolean
isEmpty()
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.void
TheputAll()
method is not supported.Theremove()
method is not supported.int
size()
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, wait
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
MessagesMap
Construct a newMessagesMap
instance that wraps the specifiedMessageResources
instance, and returns messages for the specifiedLocale
.- Parameters:
messages
-MessageResources
instance to wraplocale
-Locale
for which to retrieve messages, ornull
for the system defaultLocale
- Throws:
NullPointerException
- ifmessages
isnull
-
-
Method Details
-
clear
public void clear()Theclear()
method is not supported. -
containsKey
Returntrue
if there is a message for the specified key.- Specified by:
containsKey
in interfaceMap<String,
String> - Parameters:
key
- Message key to evaluate
-
containsValue
ThecontainsValue()
method is not supported.- Specified by:
containsValue
in interfaceMap<String,
String> - Parameters:
value
- Value to evaluate
-
entrySet
TheentrySet()
method is not supported. -
equals
Theequals
method checks whether equalMessageResources
andLocale
are being wrapped. -
get
Return the message string for the specified key. -
hashCode
public int hashCode()ThehashCode()
method returns values that will be identical if theequals
method 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.
-