public class TranslatableMessage extends Object
Constructor and Description |
---|
TranslatableMessage(String key)
Creates a new TranslatableMessage associated with the given translation
key, without any associated variables.
|
TranslatableMessage(String key,
Object variables)
Creates a new TranslatableMessage associated with the given translation
key and associated variables.
|
Modifier and Type | Method and Description |
---|---|
String |
getKey()
Returns the arbitrary key which can be used to look up the message to be
displayed in the user's native language.
|
Object |
getVariables()
Returns an arbitrary object whose properties should be substituted for
the corresponding placeholders within the string associated with the key.
|
public TranslatableMessage(String key)
key
- The translation key to associate with the TranslatableMessage.public TranslatableMessage(String key, Object variables)
key
- The translation key to associate with the TranslatableMessage.variables
- An arbitrary object whose properties should be substituted for the
corresponding placeholders within the string associated with the
given translation key.public String getKey()
public Object getVariables()
Copyright © 2018. All rights reserved.