private static final class PhoneticEngine.RulesApplication extends 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 Map<String,List<Rule>> |
finalRules |
private boolean |
found |
private int |
i |
private CharSequence |
input |
private int |
maxPhonemes |
private PhoneticEngine.PhonemeBuilder |
phonemeBuilder |
Constructor and Description |
---|
RulesApplication(Map<String,List<Rule>> finalRules,
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 Map<String,List<Rule>> finalRules
private final CharSequence input
private PhoneticEngine.PhonemeBuilder phonemeBuilder
private int i
private final int maxPhonemes
private boolean found
public RulesApplication(Map<String,List<Rule>> finalRules, 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.this
public boolean isFound()
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses