public class Normalizer
extends java.lang.Object
Modifier and Type | Field | Description |
---|---|---|
static byte |
C |
Normalization Form Selector
|
(package private) static byte |
COMPATIBILITY_MASK |
Masks for the form selector
|
(package private) static byte |
COMPOSITION_MASK |
Masks for the form selector
|
static byte |
D |
Normalization Form Selector
|
static byte |
KC |
Normalization Form Selector
|
static byte |
KD |
Normalization Form Selector
|
static byte |
NO_ACTION |
Normalization Form Selector
|
Constructor | Description |
---|---|
Normalizer(byte form,
Configuration config) |
Create a normalizer for a given form.
|
Normalizer(java.lang.CharSequence formCS,
Configuration config) |
Create a normalizer for a given form, expressed as a character string
|
Modifier and Type | Method | Description |
---|---|---|
(package private) boolean |
getExcluded(char ch) |
Just accessible for testing.
|
(package private) java.lang.String |
getRawDecompositionMapping(char ch) |
Just accessible for testing.
|
java.lang.CharSequence |
normalize(java.lang.CharSequence source) |
Normalizes text according to the chosen form
|
static final byte COMPATIBILITY_MASK
static final byte COMPOSITION_MASK
public static final byte D
public static final byte C
public static final byte KD
public static final byte KC
public static final byte NO_ACTION
public Normalizer(byte form, Configuration config) throws XPathException
form
- the normalization form required: for example C
, D
XPathException
public Normalizer(java.lang.CharSequence formCS, Configuration config) throws XPathException
formCS
- the normalization form required: for example "NFC" or "NFD"XPathException
public java.lang.CharSequence normalize(java.lang.CharSequence source)
source
- the original text, unnormalizedboolean getExcluded(char ch)
ch
- a characterjava.lang.String getRawDecompositionMapping(char ch)
ch
- a character