temmental
Class TemplateMessages

java.lang.Object
  extended by temmental.TemplateMessages

public class TemplateMessages
extends java.lang.Object

Wrapper to ResourceBundle or Properties. It is used for internationalization. Instances are created on Template constructors calls.


Method Summary
 boolean containsKey(java.lang.String key)
          Tests if the specified key is known in messages.
 java.lang.String format(java.lang.String key, java.util.List<java.lang.Object> parameters)
          Format the message with the specified key in messages with the specified parameters
 java.lang.String getString(java.lang.String key)
          Searches the message with the specified key in messages.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

containsKey

public boolean containsKey(java.lang.String key)
Tests if the specified key is known in messages.

Parameters:
key - possible key
Returns:
true if and only if the specified object is a key in this messages; false otherwise.

getString

public java.lang.String getString(java.lang.String key)
Searches the message with the specified key in messages. If the key is not found, returns null.

Parameters:
key - the message key
Returns:
the value in the messages with the specified key value.

format

public java.lang.String format(java.lang.String key,
                               java.util.List<java.lang.Object> parameters)
Format the message with the specified key in messages with the specified parameters

Parameters:
key - the message key
parameters - the parameters
Returns:
the formatted message
See Also:
String.format(String, Object...)