Class Transliteration.Builder

Enclosing class:
Transliteration

public static final class Transliteration.Builder extends BaseAttribute.Builder<Transliteration,Transliteration.Builder>
  • Constructor Details

    • Builder

      public Builder(com.basistech.util.ISO15924 script, String value)
      Creates a builder with the given transliteration text, and script pair.
      Parameters:
      script - The script.
      value - The transliterated text.
    • Builder

      public Builder(Transliteration other)
      Creates a builder that starts out with the same transliterations as the given Transliteration.
      Parameters:
      other - The transliteration to base off of.
    • Builder

      public Builder()
      Creates a builder without any transliterated text.
  • Method Details

    • add

      public Transliteration.Builder add(com.basistech.util.ISO15924 script, String value)
      Adds a transliterated text to this builder.
      Parameters:
      script - The script of the transliteration.
      value - The transliterated text itself.
      Returns:
      this.
    • add

      public Transliteration.Builder add(Transliteration transliteration)
      Adds all the transliterations within the given Transliteration to this builder.
      Parameters:
      transliteration - The transliteration.
      Returns:
      this.
    • clearTransliterations

      public Transliteration.Builder clearTransliterations()
      Clears all the transliterated texts within the current builder.
      Returns:
      this.
    • transliterations

      public Transliteration.Builder transliterations(Map<com.basistech.util.ISO15924,String> forLang)
      Sets the internal script to transliterated text mapping to a copy of the given map.
      Parameters:
      forLang - The map to copy.
      Returns:
      this.
    • of

      public static Transliteration.Builder of(com.basistech.util.ISO15924 script, String transliteration)
      Creates a new builder with a transliterated text under the given script.
      Parameters:
      script - The script.
      transliteration - The transliterated text.
      Returns:
      A builder that starts with the given mapping.
    • of

      public static Transliteration.Builder of(Transliteration transliteration)
      Creates a builder whose contents are a copy of the given Transliteration.
      Parameters:
      transliteration - The transliteration to copy.
      Returns:
      A new builder that starts out the same as the given transliteration.
    • build

      public Transliteration build()
      Creates a new Transliteration from the current state of this builder.
      Returns:
      The newly created Transliteration
    • getThis

      protected Transliteration.Builder getThis()
      Specified by:
      getThis in class BaseAttribute.Builder<Transliteration,Transliteration.Builder>