|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.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 |
Nested classes inherited from class java.util.Map |
java.util.Map.Entry |
Field Summary | |
private java.util.Locale |
locale
The Locale for which to return messages, or
null for the system default Locale . |
private org.apache.struts.util.MessageResources |
messages
The MessageResources being wrapped by this
MessagesMap . |
Constructor Summary | |
MessagesMap(org.apache.struts.util.MessageResources messages,
java.util.Locale locale)
Construct a new MessagesMap instance that wraps the
specified MessageResources instance, and returns messages
for the specified Locale . |
Method Summary | |
void |
clear()
The clear() method is not supported. |
boolean |
containsKey(java.lang.Object key)
Return true if there is a message for the
specified key. |
boolean |
containsValue(java.lang.Object value)
The containsValue() method is not supported. |
java.util.Set |
entrySet()
The entrySet() method is not supported. |
boolean |
equals(java.lang.Object o)
The equals method checks whether equal
MessageResources and Locale are
being wrapped. |
java.lang.Object |
get(java.lang.Object key)
Return the message string for the specified key. |
(package private) java.util.Locale |
getLocale()
Return the Locale we object we are wrapping. |
(package private) org.apache.struts.util.MessageResources |
getMessages()
Return the MessageResources object we are wrapping. |
int |
hashCode()
The hashCode() method returns values that will
be identical if the equals method returns true . |
boolean |
isEmpty()
The isEmpty() method returns false , on the
assumption that there is always at least one message available. |
java.util.Set |
keySet()
The keySet() method is not supported. |
java.lang.Object |
put(java.lang.Object key,
java.lang.Object value)
The put() method is not supported. |
void |
putAll(java.util.Map map)
The putAll() method is not supported. |
java.lang.Object |
remove(java.lang.Object key)
The remove() method is not supported. |
int |
size()
The size() method is not supported. |
java.util.Collection |
values()
The values() method is not supported. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private java.util.Locale locale
The Locale
for which to return messages, or
null
for the system default Locale
.
private org.apache.struts.util.MessageResources messages
The MessageResources
being wrapped by this
MessagesMap
.
Constructor Detail |
public MessagesMap(org.apache.struts.util.MessageResources messages, java.util.Locale locale)
Construct a new MessagesMap
instance that wraps the
specified MessageResources
instance, and returns messages
for the specified Locale
.
messages
- MessageResources
instance to wraplocale
- Locale
for which to retrieve messages,
or null
for the system default Locale
java.lang.NullPointerException
- if messages
is null
Method Detail |
public void clear()
The clear()
method is not supported.
clear
in interface java.util.Map
public boolean containsKey(java.lang.Object key)
Return true
if there is a message for the
specified key.
containsKey
in interface java.util.Map
key
- Message key to evaluatepublic boolean containsValue(java.lang.Object value)
The containsValue()
method is not supported.
containsValue
in interface java.util.Map
value
- Value to evaluatepublic java.util.Set entrySet()
The entrySet()
method is not supported.
entrySet
in interface java.util.Map
public boolean equals(java.lang.Object o)
The equals
method checks whether equal
MessageResources
and Locale
are
being wrapped.
equals
in interface java.util.Map
o
- The object to be comparedpublic java.lang.Object get(java.lang.Object key)
Return the message string for the specified key.
get
in interface java.util.Map
key
- Key for message to returnpublic int hashCode()
The hashCode()
method returns values that will
be identical if the equals
method returns true
.
hashCode
in interface java.util.Map
public boolean isEmpty()
The isEmpty()
method returns false
, on the
assumption that there is always at least one message available.
isEmpty
in interface java.util.Map
public java.util.Set keySet()
The keySet()
method is not supported.
keySet
in interface java.util.Map
public java.lang.Object put(java.lang.Object key, java.lang.Object value)
The put()
method is not supported.
put
in interface java.util.Map
key
- Key to storevalue
- Value to storepublic void putAll(java.util.Map map)
The putAll()
method is not supported.
putAll
in interface java.util.Map
map
- Keys and values to storepublic java.lang.Object remove(java.lang.Object key)
The remove()
method is not supported.
remove
in interface java.util.Map
key
- Key to removepublic int size()
The size()
method is not supported.
size
in interface java.util.Map
public java.util.Collection values()
The values()
method is not supported.
values
in interface java.util.Map
java.util.Locale getLocale()
Return the Locale
we object we are wrapping.
org.apache.struts.util.MessageResources getMessages()
Return the MessageResources
object we are wrapping.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |