Class PhoneticEngine.Builder
java.lang.Object
org.apache.commons.codec.language.bm.PhoneticEngine.Builder
- All Implemented Interfaces:
Supplier<PhoneticEngine>
- Enclosing class:
PhoneticEngine
Builder for a PhoneticEngine.
- Since:
- 1.23.0
-
Method Summary
Modifier and TypeMethodDescriptionget()setAll(PhoneticEngine engine) Sets all the properties of this builder to match those of the given engine.setConcat(boolean concat) Sets whether the engine will concatenate multiple encodings.setMaxInputLength(int maxInputLength) Sets the maximum input length allowed.setMaxPhonemes(int maxPhonemes) Sets maximum number of phonemes the engine will handle.setNameType(NameType nameType) Sets the name type for the engine to be built.setRuleType(RuleType ruleType) Sets the rule type for the engine to be built.
-
Method Details
-
get
- Specified by:
getin interfaceSupplier<PhoneticEngine>
-
setAll
Sets all the properties of this builder to match those of the given engine.- Parameters:
engine- The engine to copy properties from.- Returns:
- This builder.
-
setConcat
Sets whether the engine will concatenate multiple encodings.- Parameters:
concat- Whether the engine will concatenate multiple encodings.- Returns:
- This builder.
-
setMaxInputLength
Sets the maximum input length allowed.A value less than 0 will reset the maximum input length to the default value of 666, see Hubert Blaine Wolfeschlegelsteinhausenbergerdorff Sr..
- Parameters:
maxInputLength- the maximum input length allowed.- Returns:
- This builder.
-
setMaxPhonemes
Sets maximum number of phonemes the engine will handle.A value less than 0 will reset the maximum number of phonemes to the default 20.
- Parameters:
maxPhonemes- The maximum number of phonemes the engine will handle.- Returns:
- This builder.
-
setNameType
Sets the name type for the engine to be built.A null value will reset the name type to the default of
NameType.GENERIC.- Parameters:
nameType- The type of names the engine will use.- Returns:
- This builder.
-
setRuleType
Sets the rule type for the engine to be built.A null value will reset the rule type to the default of
RuleType.APPROX.- Parameters:
ruleType- The type of rules the engine will use.- Returns:
- This builder.
-