Modifier and Type | Field and Description |
---|---|
private Normalizer2 | |
private UnicodeSet |
Access | Constructor and Description |
---|---|
public | FilteredNormalizer2(Normalizer2
wrapped Normalizer2 instance n2, UnicodeSet UnicodeSet which determines the characters to be normalized filterSet)Constructs a filtered normalizer wrapping any Normalizer2 instance and a filter set. |
Modifier and Type | Method and Description |
---|---|
public StringBuilder | append(StringBuilder
string, should be normalized first, CharSequence string, should be normalized second)Implements abstract jdk. |
public int | getCombiningClass(int
code point c)Overrides jdk. |
public String | getDecomposition(int
code point c)Implements abstract jdk. |
public boolean | hasBoundaryBefore(int
character to test c)Implements abstract jdk. |
public boolean | isNormalized(CharSequence
input string s)Implements abstract jdk. |
public StringBuilder | normalize(CharSequence
source string src, StringBuilder destination string; its contents is replaced with normalized src dest)Implements abstract jdk. |
public Appendable | normalize(CharSequence
source string src, Appendable destination Appendable; gets normalized src appended dest)Implements abstract jdk. |
private Appendable | |
public StringBuilder | normalizeSecondAndAppend(StringBuilder
string, should be normalized first, CharSequence string, will be normalized second)Implements abstract jdk. |
private StringBuilder | |
public int | spanQuickCheckYes(CharSequence
input string s)Implements abstract jdk. |
norm2 | back to summary |
---|---|
private Normalizer2 norm2 |
set | back to summary |
---|---|
private UnicodeSet set |
FilteredNormalizer2 | back to summary |
---|---|
public FilteredNormalizer2(Normalizer2 n2, UnicodeSet filterSet) Constructs a filtered normalizer wrapping any Normalizer2 instance and a filter set. Both are aliased and must not be modified or deleted while this object is used. The filter set should be frozen; otherwise the performance will suffer greatly.
|
append | back to summary |
---|---|
public StringBuilder append(StringBuilder first, CharSequence second) Implements abstract jdk. Doc from jdk. Appends the second string to the first string (merging them at the boundary) and returns the first string. The result is normalized if both the strings were normalized. The first and second strings must be different objects.
|
getCombiningClass | back to summary |
---|---|
public int getCombiningClass(int c) Overrides jdk. Doc from jdk. Gets the combining class of c. The default implementation returns 0 but all standard implementations return the Unicode Canonical_Combining_Class value. |
getDecomposition | back to summary |
---|---|
public String getDecomposition(int c) Implements abstract jdk. Doc from jdk. Gets the decomposition mapping of c. Roughly equivalent to normalizing the String form of c on a DECOMPOSE Normalizer2 instance, but much faster, and except that this function returns null if c does not have a decomposition mapping in this instance's data. This function is independent of the mode of the Normalizer2. |
hasBoundaryBefore | back to summary |
---|---|
public boolean hasBoundaryBefore(int c) Implements abstract jdk. Doc from jdk. Tests if the character always has a normalization boundary before it, regardless of context. If true, then the character does not normalization-interact with preceding characters. In other words, a string containing this character can be normalized by processing portions before this character and starting from this character independently. This is used for iterative normalization. See the class documentation for details. |
isNormalized | back to summary |
---|---|
public boolean isNormalized(CharSequence s) Implements abstract jdk. Doc from jdk. Tests if the string is normalized. Internally, in cases where the quickCheck() method would return "maybe" (which is only possible for the two COMPOSE modes) this method resolves to "yes" or "no" to provide a definitive result, at the cost of doing more work in those cases.
|
normalize | back to summary |
---|---|
public StringBuilder normalize(CharSequence src, StringBuilder dest) Implements abstract jdk. Doc from jdk. Writes the normalized form of the source string to the destination string (replacing its contents) and returns the destination string. The source and destination strings must be different objects.
|
normalize | back to summary |
---|---|
public Appendable normalize(CharSequence src, Appendable dest) Implements abstract jdk. Doc from jdk. Writes the normalized form of the source string to the destination Appendable and returns the destination Appendable. The source and destination strings must be different objects. Any
|
normalize | back to summary |
---|---|
private Appendable normalize(CharSequence src, Appendable dest, UnicodeSet. |
normalizeSecondAndAppend | back to summary |
---|---|
public StringBuilder normalizeSecondAndAppend(StringBuilder first, CharSequence second) Implements abstract jdk. Doc from jdk. Appends the normalized form of the second string to the first string (merging them at the boundary) and returns the first string. The result is normalized if the first string was normalized. The first and second strings must be different objects.
|
normalizeSecondAndAppend | back to summary |
---|---|
private StringBuilder normalizeSecondAndAppend(StringBuilder first, CharSequence second, boolean doNormalize) |
spanQuickCheckYes | back to summary |
---|---|
public int spanQuickCheckYes(CharSequence s) Implements abstract jdk. Doc from jdk. Returns the end of the normalized substring of the input string.
In other words, with The returned end index is usually one or more characters before the "no" or "maybe" character: The end index is at a normalization boundary. (See the class documentation for more about normalization boundaries.) When the goal is a normalized string and most input strings are expected to be normalized already, then call this method, and if it returns a prefix shorter than the input string, copy that prefix and use normalizeSecondAndAppend() for the remainder.
|