|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.struts.faces.util.MessagesMap
public class 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/interfaces inherited from interface java.util.Map |
---|
Map.Entry<K,V> |
Constructor Summary | |
---|---|
MessagesMap(MessageResources messages,
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(Object key)
Return true if there is a message for the
specified key. |
boolean |
containsValue(Object value)
The containsValue() method is not supported. |
Set |
entrySet()
The entrySet() method is not supported. |
boolean |
equals(Object o)
The equals method checks whether equal
MessageResources and Locale are
being wrapped. |
Object |
get(Object key)
Return the message string for the specified key. |
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. |
Set |
keySet()
The keySet() method is not supported. |
Object |
put(Object key,
Object value)
The put() method is not supported. |
void |
putAll(Map map)
The putAll() method is not supported. |
Object |
remove(Object key)
The remove() method is not supported. |
int |
size()
The size() method is not supported. |
Collection |
values()
The values() method is not supported. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MessagesMap(MessageResources messages, 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
NullPointerException
- if messages
is null
Method Detail |
---|
public void clear()
The clear()
method is not supported.
clear
in interface Map
public boolean containsKey(Object key)
Return true
if there is a message for the
specified key.
containsKey
in interface Map
key
- Message key to evaluatepublic boolean containsValue(Object value)
The containsValue()
method is not supported.
containsValue
in interface Map
value
- Value to evaluatepublic Set entrySet()
The entrySet()
method is not supported.
entrySet
in interface Map
public boolean equals(Object o)
The equals
method checks whether equal
MessageResources
and Locale
are
being wrapped.
equals
in interface Map
equals
in class Object
o
- The object to be comparedpublic Object get(Object key)
Return the message string for the specified key.
get
in interface 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 Map
hashCode
in class Object
public boolean isEmpty()
The isEmpty()
method returns false
, on the
assumption that there is always at least one message available.
isEmpty
in interface Map
public Set keySet()
The keySet()
method is not supported.
keySet
in interface Map
public Object put(Object key, Object value)
The put()
method is not supported.
put
in interface Map
key
- Key to storevalue
- Value to storepublic void putAll(Map map)
The putAll()
method is not supported.
putAll
in interface Map
map
- Keys and values to storepublic Object remove(Object key)
The remove()
method is not supported.
remove
in interface Map
key
- Key to removepublic int size()
The size()
method is not supported.
size
in interface Map
public Collection values()
The values()
method is not supported.
values
in interface Map
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |