Package com.basistech.rosette.dm
Class Transliteration.Builder
java.lang.Object
com.basistech.rosette.dm.BaseAttribute.Builder<Transliteration,Transliteration.Builder>
com.basistech.rosette.dm.Transliteration.Builder
- Enclosing class:
- Transliteration
public static final class Transliteration.Builder
extends BaseAttribute.Builder<Transliteration,Transliteration.Builder>
-
Constructor Summary
ConstructorsConstructorDescriptionBuilder()Creates a builder without any transliterated text.Builder(Transliteration other) Creates a builder that starts out with the same transliterations as the givenTransliteration.Creates a builder with the given transliteration text, and script pair. -
Method Summary
Modifier and TypeMethodDescriptionadd(Transliteration transliteration) Adds all the transliterations within the givenTransliterationto this builder.Adds a transliterated text to this builder.build()Creates a newTransliterationfrom the current state of this builder.Clears all the transliterated texts within the current builder.protected Transliteration.BuildergetThis()static Transliteration.Builderof(Transliteration transliteration) Creates a builder whose contents are a copy of the givenTransliteration.static Transliteration.BuilderCreates a new builder with a transliterated text under the given script.transliterations(Map<com.basistech.util.ISO15924, String> forLang) Sets the internal script to transliterated text mapping to a copy of the given map.Methods inherited from class com.basistech.rosette.dm.BaseAttribute.Builder
addAllToList, addAllToSet, buildExtendedProperties, extendedProperties, extendedProperty, nullOrList
-
Constructor Details
-
Builder
Creates a builder with the given transliteration text, and script pair.- Parameters:
script- The script.value- The transliterated text.
-
Builder
Creates a builder that starts out with the same transliterations as the givenTransliteration.- Parameters:
other- The transliteration to base off of.
-
Builder
public Builder()Creates a builder without any transliterated text.
-
-
Method Details
-
add
Adds a transliterated text to this builder.- Parameters:
script- The script of the transliteration.value- The transliterated text itself.- Returns:
this.
-
add
Adds all the transliterations within the givenTransliterationto this builder.- Parameters:
transliteration- The transliteration.- Returns:
this.
-
clearTransliterations
Clears all the transliterated texts within the current builder.- Returns:
this.
-
transliterations
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
Creates a builder whose contents are a copy of the givenTransliteration.- Parameters:
transliteration- The transliteration to copy.- Returns:
- A new builder that starts out the same as the given transliteration.
-
build
Creates a newTransliterationfrom the current state of this builder.- Returns:
- The newly created
Transliteration
-
getThis
- Specified by:
getThisin classBaseAttribute.Builder<Transliteration,Transliteration.Builder>
-