public abstract static class Norm2AllModes.Normalizer2WithImpl extends Normalizer2
Normalizer2.Mode| Modifier and Type | Field and Description |
|---|---|
Normalizer2Impl |
impl |
| Constructor and Description |
|---|
Normalizer2WithImpl(Normalizer2Impl ni) |
| Modifier and Type | Method and Description |
|---|---|
StringBuilder |
append(StringBuilder first,
CharSequence second)
Appends the second string to the first string
(merging them at the boundary) and returns the first string.
|
int |
composePair(int a,
int b)
Performs pairwise composition of a & b and returns the composite if there is one.
|
int |
getCombiningClass(int c)
Gets the combining class of c.
|
String |
getDecomposition(int c)
Gets the decomposition mapping of c.
|
abstract int |
getQuickCheck(int c) |
String |
getRawDecomposition(int c)
Gets the raw decomposition mapping of c.
|
boolean |
isNormalized(CharSequence s)
Tests if the string is normalized.
|
Appendable |
normalize(CharSequence src,
Appendable dest)
Writes the normalized form of the source string to the destination Appendable
and returns the destination Appendable.
|
protected abstract void |
normalize(CharSequence src,
Normalizer2Impl.ReorderingBuffer buffer) |
StringBuilder |
normalize(CharSequence src,
StringBuilder dest)
Writes the normalized form of the source string to the destination string
(replacing its contents) and returns the destination string.
|
protected abstract void |
normalizeAndAppend(CharSequence src,
boolean doNormalize,
Normalizer2Impl.ReorderingBuffer buffer) |
StringBuilder |
normalizeSecondAndAppend(StringBuilder first,
CharSequence second)
Appends the normalized form of the second string to the first string
(merging them at the boundary) and returns the first string.
|
StringBuilder |
normalizeSecondAndAppend(StringBuilder first,
CharSequence second,
boolean doNormalize) |
Normalizer.QuickCheckResult |
quickCheck(CharSequence s)
Tests if the string is normalized.
|
getInstance, getNFCInstance, getNFDInstance, getNFKCCasefoldInstance, getNFKCInstance, getNFKDInstance, hasBoundaryAfter, hasBoundaryBefore, isInert, normalize, spanQuickCheckYespublic final Normalizer2Impl impl
public Normalizer2WithImpl(Normalizer2Impl ni)
public StringBuilder normalize(CharSequence src, StringBuilder dest)
Normalizer2normalize in class Normalizer2src - source stringdest - destination string; its contents is replaced with normalized srcpublic Appendable normalize(CharSequence src, Appendable dest)
Normalizer2Any IOException is wrapped into a ICUUncheckedIOException.
normalize in class Normalizer2src - source stringdest - destination Appendable; gets normalized src appendedprotected abstract void normalize(CharSequence src, Normalizer2Impl.ReorderingBuffer buffer)
public StringBuilder normalizeSecondAndAppend(StringBuilder first, CharSequence second)
Normalizer2normalizeSecondAndAppend in class Normalizer2first - string, should be normalizedsecond - string, will be normalizedpublic StringBuilder append(StringBuilder first, CharSequence second)
Normalizer2append in class Normalizer2first - string, should be normalizedsecond - string, should be normalizedpublic StringBuilder normalizeSecondAndAppend(StringBuilder first, CharSequence second, boolean doNormalize)
protected abstract void normalizeAndAppend(CharSequence src, boolean doNormalize, Normalizer2Impl.ReorderingBuffer buffer)
public String getDecomposition(int c)
Normalizer2getDecomposition in class Normalizer2c - code pointpublic String getRawDecomposition(int c)
Normalizer2This is similar to the getDecomposition() method but returns the raw decomposition mapping as specified in UnicodeData.txt or (for custom data) in the mapping files processed by the gennorm2 tool. By contrast, getDecomposition() returns the processed, recursively-decomposed version of this mapping.
When used on a standard NFKC Normalizer2 instance, getRawDecomposition() returns the Unicode Decomposition_Mapping (dm) property.
When used on a standard NFC Normalizer2 instance, it returns the Decomposition_Mapping only if the Decomposition_Type (dt) is Canonical (Can); in this case, the result contains either one or two code points (=1..4 Java chars).
This function is independent of the mode of the Normalizer2. The default implementation returns null.
getRawDecomposition in class Normalizer2c - code pointpublic int composePair(int a,
int b)
Normalizer2Returns a composite code point c only if c has a two-way mapping to a+b. In standard Unicode normalization, this means that c has a canonical decomposition to a+b and c does not have the Full_Composition_Exclusion property.
This function is independent of the mode of the Normalizer2. The default implementation returns a negative value.
composePair in class Normalizer2a - A (normalization starter) code point.b - Another code point.public int getCombiningClass(int c)
Normalizer2getCombiningClass in class Normalizer2c - code pointpublic boolean isNormalized(CharSequence s)
Normalizer2isNormalized in class Normalizer2s - input stringpublic Normalizer.QuickCheckResult quickCheck(CharSequence s)
Normalizer2quickCheck in class Normalizer2s - input stringpublic abstract int getQuickCheck(int c)