public final class

Normalizer

extends Object
java.lang.Object
   ↳ sun.text.Normalizer

Class Overview

This Normalizer is for Unicode 3.2 support for IDNA only. Developers should not use this class.@ since 1.6

Summary

Constants
int UNICODE_3_2 Option to select Unicode 3.2 (without corrigendum 4 corrections) for normalization.
Public Methods
final static int getCombiningClass(int ch)
Returns the combining class of the given character
static boolean isNormalized(CharSequence src, Normalizer.Form form, int option)
Determines if the given sequence of char values is normalized.
static String normalize(CharSequence src, Normalizer.Form form, int option)
Normalize a sequence of char values.
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final int UNICODE_3_2

Option to select Unicode 3.2 (without corrigendum 4 corrections) for normalization.

Constant Value: 262432 (0x00040120)

Public Methods

public static final int getCombiningClass (int ch)

Returns the combining class of the given character

Parameters
ch character to retrieve combining class of
Returns
  • combining class of the given character

public static boolean isNormalized (CharSequence src, Normalizer.Form form, int option)

Determines if the given sequence of char values is normalized.

Parameters
src The sequence of char values to be checked.
form The normalization form; one of NFC, NFD, NFKC, NFKD
option The normalization option; UNICODE_3_2
Returns
  • true if the sequence of char values is normalized; false otherwise.
Throws
NullPointerException If src or form is null.

public static String normalize (CharSequence src, Normalizer.Form form, int option)

Normalize a sequence of char values. The sequence will be normalized according to the specified normalization from.

Parameters
src The sequence of char values to normalize.
form The normalization form; one of NFC, NFD, NFKC, NFKD
option The normalization option; UNICODE_3_2
Returns
  • The normalized String
Throws
NullPointerException If src or form is null.