|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfi.hu.cs.titokone.Message
This class represents a translatable message to the user. It uses the Translator class statically to deal with the actual translation.
Field Summary | |
private java.lang.String |
messageKey
|
private java.lang.String[] |
parameters
|
Constructor Summary | |
Message(java.lang.String messageKey)
This constructor sets up a static message. |
|
Message(java.lang.String templateKey,
java.lang.String parameter)
This constructor sets up a message with modifiable parts, and sets what they will be replaced with. |
|
Message(java.lang.String templateKey,
java.lang.String[] parameters)
This constructor sets up a message with modifiable parts, and sets what they will be replaced with. |
Method Summary | |
java.lang.String |
toString()
This method translates the message and does any necessary replacement of parameters into the string itself. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private java.lang.String messageKey
private java.lang.String[] parameters
Constructor Detail |
public Message(java.lang.String messageKey)
messageKey
- The identifying key, possibly equal to the default
English message. The value is used to find the translation.public Message(java.lang.String templateKey, java.lang.String parameter)
templateKey
- The identifying key, possibly equal to the default
English message. The value is used to find the translation.parameter
- The value to replace a {0} marker in the template
message.public Message(java.lang.String templateKey, java.lang.String[] parameters)
templateKey
- The identifying key, possibly equal to the default
English message. The value is used to find the translation.parameters
- The values to replace {i} markers in the template
message in order. If there are less strings in the array than there
are markers, the remaining markers will show as such in the
resulting string. If there are more strings in the array than are
needed, the final ones are ignored.Method Detail |
public java.lang.String toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |