@XStreamConverter(value=TextConverter.class) public final class Text extends Object implements Cloneable, Serializable
Text represents translation for a single translation key, language and state.LanguageManager,
Language,
Value,
Serialized Form| Constructor and Description |
|---|
Text()
Constructs new
Text with default state and empty text. |
Text(String text)
Constructs new
Text with default state and specified translation text. |
Text(String text,
String state)
Constructs new
Text with the specified state and translation text. |
Text(String text,
String state,
int mnemonic)
Constructs new
Text with the specified state and translation text. |
| Modifier and Type | Method and Description |
|---|---|
int |
getMnemonic()
Returns mnemonic character.
|
String |
getState()
Returns state this translation is used for.
|
String |
getText(Object... data)
Returns parsed
text or raw contents depending on provided data. |
void |
setMnemonic(int mnemonic)
Sets mnemonic character.
|
void |
setState(String state)
Sets state this translation is used for.
|
void |
setText(String text)
Sets translation text.
|
String |
toString() |
public Text()
Text with default state and empty text.public Text(@NotNull String text)
Text with default state and specified translation text.text - translation textpublic Text(@NotNull String text, @Nullable String state)
Text with the specified state and translation text.text - translation textstate - state this translation is used for@NotNull public String getText(@NotNull Object... data)
text or raw contents depending on provided data.data - language data to processtext or raw contents depending on provided datapublic void setText(@NotNull String text)
text - translation text@Nullable public String getState()
public void setState(@Nullable String state)
state - state this translation is used forpublic int getMnemonic()
public void setMnemonic(int mnemonic)
mnemonic - new mnemonic characterCopyright © 2020. All rights reserved.