|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.mguennewig.pobjform.Message
public final class Message
An encapsulation of an individual message returned by the
PObjForm.validate() method of an form,
consisting of a message key (to be used to look up message text in an
appropriate message resources database) plus placeholder objects that can be
used for parametric replacement in the message text.
The placeholder objects are referenced in the message text using the
same syntax used by the JDK MessageFormat class. Thus, the
first placeholder is '{0}', the second is '{1}',
etc.
| Constructor Summary | |
|---|---|
Message(java.lang.String key,
java.lang.Object... values)
Construct a message with the specified replacement values. |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object obj)
|
java.lang.String |
format(java.util.ResourceBundle bundle)
Formats this message into a localized text ready to present to the user. |
java.lang.String |
getKey()
Get the message key for this message. |
java.lang.Object[] |
getValues()
Get the replacement values for this message. |
int |
hashCode()
|
static Message |
parse(java.lang.String s)
Construct a Message from its textual representation. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Message(java.lang.String key,
java.lang.Object... values)
| Method Detail |
|---|
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.lang.String format(java.util.ResourceBundle bundle)
java.util.MissingResourceException - if the resource for the
key can not be found.public java.lang.String getKey()
public java.lang.Object[] getValues()
public int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic static Message parse(java.lang.String s)
Message from its textual representation.
The string must follow the schema:
<key> (<argumentStringLength>:<argumentString>)*
java.lang.NumberFormatException - if the string contains an
argumentStringLength that is not a valid number.toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||