|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectit.amattioli.workstate.exceptions.KeyedMessage
public class KeyedMessage
A message identified by a key inside a bundle. You can also pass a set of parameters that can be substituted inside the message.
| Constructor Summary | |
|---|---|
KeyedMessage(String key)
Construct a message identified by the given key. |
|
KeyedMessage(String key,
Map<String,String> parameters)
Construct a message identified by the given key and with the given parameters. |
|
| Method Summary | |
|---|---|
void |
addParameter(String tag,
String value)
Add a parameter to the message. |
boolean |
equals(Object o)
Two messages are equal if they have the same key and the same parameters. |
String |
getKey()
Returns the message key. |
Map<String,String> |
getParameters()
Return an immutable map containing the message parameters. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public KeyedMessage(String key)
key - the key that identifies the message inside a message bundle
NullPointerException - if the parameter is null
public KeyedMessage(String key,
Map<String,String> parameters)
key - the key that identifies the message inside a message bundleparameters - the parameters to be substituted inside a message| Method Detail |
|---|
public void addParameter(String tag,
String value)
tag - the parameter keyvalue - the value to be substituted inside the message
IllegalArgumentException - if the message already contains a
parameter with the same keypublic String getKey()
public Map<String,String> getParameters()
public boolean equals(Object o)
equals in class Objecto - the object to be compared to this for equality
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||