Package org.polyfrost.polyui.input
Class Translator.Text
-
- All Implemented Interfaces:
-
kotlin.Cloneable
public final class Translator.Text implements Cloneable
Internal representation of a string in PolyUI.
The string can be translated if there is an attached Translator to this instance and the key is present in the file.
-
-
Field Summary
Fields Modifier and Type Field Description private final Integerlengthprivate transient Translatortranslatorprivate final BooleanhasObjectsprivate Stringstringprivate final transient BooleancanTranslateprivate final Booleaninitializedprivate final Stringkeyprivate final transient Array<out Object>objects
-
Constructor Summary
Constructors Constructor Description Translator.Text(String key, Object objects)
-
Method Summary
Modifier and Type Method Description final IntegergetLength()final TranslatorgetTranslator()final UnitsetTranslator(Translator translator)final BooleangetHasObjects()final StringgetString()final UnitsetString(String string)final BooleangetCanTranslate()if this Text has an attached PolyTranslator, meaning it is able to attempt to translate. final BooleangetInitialized()final StringgetKey()final Array<out Object>getObjects()final Unitreset()reset this text according to the translation table (if attached) Translator.Textclone()StringtoString()-
-
Method Detail
-
getTranslator
final Translator getTranslator()
-
setTranslator
final Unit setTranslator(Translator translator)
-
getHasObjects
final Boolean getHasObjects()
-
getCanTranslate
final Boolean getCanTranslate()
if this Text has an attached PolyTranslator, meaning it is able to attempt to translate.
-
getInitialized
final Boolean getInitialized()
-
getObjects
final Array<out Object> getObjects()
-
clone
Translator.Text clone()
-
-
-
-