private static final class PhoneticEngine.RulesApplication
extends java.lang.Object
i and found are updated. i points to the
index of the next char in input that must be processed next (the input up to that index having been
processed already), and found indicates if a matching rule was found or not. In the case where a
matching rule was found, phonemeBuilder is replaced with a new builder containing the phonemes
updated by the matching rule.
Although this class is not thread-safe (it has mutable unprotected fields), it is not shared between threads
as it is constructed as needed by the calling methods.| Modifier and Type | Field and Description |
|---|---|
private java.util.Map<java.lang.String,java.util.List<Rule>> |
finalRules |
private boolean |
found |
private int |
i |
private java.lang.CharSequence |
input |
private int |
maxPhonemes |
private PhoneticEngine.PhonemeBuilder |
phonemeBuilder |
| Constructor and Description |
|---|
PhoneticEngine.RulesApplication(java.util.Map<java.lang.String,java.util.List<Rule>> finalRules,
java.lang.CharSequence input,
PhoneticEngine.PhonemeBuilder phonemeBuilder,
int i,
int maxPhonemes) |
| Modifier and Type | Method and Description |
|---|---|
int |
getI() |
PhoneticEngine.PhonemeBuilder |
getPhonemeBuilder() |
PhoneticEngine.RulesApplication |
invoke()
Invokes the rules.
|
boolean |
isFound() |
private final java.util.Map<java.lang.String,java.util.List<Rule>> finalRules
private final java.lang.CharSequence input
private PhoneticEngine.PhonemeBuilder phonemeBuilder
private int i
private final int maxPhonemes
private boolean found
public PhoneticEngine.RulesApplication(java.util.Map<java.lang.String,java.util.List<Rule>> finalRules, java.lang.CharSequence input, PhoneticEngine.PhonemeBuilder phonemeBuilder, int i, int maxPhonemes)
public int getI()
public PhoneticEngine.PhonemeBuilder getPhonemeBuilder()
public PhoneticEngine.RulesApplication invoke()
i is advanced one and the character is silently dropped from the phonetic spelling.thispublic boolean isFound()
commons-codec version 1.10-SNAPSHOT - Copyright © 2002-2015 - Apache Software Foundation