Class Translation

java.lang.Object
com.priint.pubserver.lang.Translation
All Implemented Interfaces:
Serializable

public class Translation extends Object implements Serializable
List of translations for a identifier.

Exposes a fluid interface.

See Also:
  • Constructor Details

  • Method Details

    • getIdentifier

      public String getIdentifier()
      Get the identifier for the translations.
      Returns:
      identifier of the translation
    • setIdentifier

      public Translation setIdentifier(String identifier)
      Set the identifier for the translations.
      Parameters:
      identifier - new identifier for the translation
      Returns:
      Translation for chaining.
    • getEntries

      public List<Translation.Entry> getEntries()
      Get all localized values for the identifier.
      Returns:
      localized values for the identifier
    • setEntries

      public Translation setEntries(List<Translation.Entry> entries)
      Set the localized values for the identifier.
      Parameters:
      entries - localized entries for this translation
      Returns:
      Translation for chaining.
    • addEntry

      public Translation addEntry(@NotNull @NotNull Translation.Entry entry)
      Add a translation entry for the identifier.
      Parameters:
      entry - new localized entry for this translation
      Returns:
      Translation for chaining.
    • addEntry

      public Translation addEntry(String lang, String value)
      Add a translation entry for the identifier.
      Parameters:
      lang - language code
      value - value of translation * @return Translation for chaining.
    • localized

      public Translation localized(String languageCode)
    • getValue

      public String getValue()
    • getValue

      public String getValue(String languageCode)
    • toString

      public String toString()
      Overrides:
      toString in class Object