Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 /*
  * Copyright 2005 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.  Sun designates this
  * particular file as subject to the "Classpath" exception as provided
  * by Sun in the LICENSE file that accompanied this code.
 *
 * This code is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 * version 2 for more details (a copy is included in the LICENSE file that
 * accompanied this code).
 *
 * You should have received a copy of the GNU General Public License version
 * 2 along with this work; if not, write to the Free Software Foundation,
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 *
 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
 * CA 95054 USA or visit www.sun.com if you need additional information or
 * have any questions.
 */
package sun.text;
This Normalizer is for Unicode 3.2 support for IDNA only. Developers should not use this class.

:
since 1.6
public final class Normalizer {
    private Normalizer() {};

    
Option to select Unicode 3.2 (without corrigendum 4 corrections) for normalization.
    public static final int UNICODE_3_2 = .;

    
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 java.text.Normalizer.Form.NFC, java.text.Normalizer.Form.NFD, java.text.Normalizer.Form.NFKC, java.text.Normalizer.Form.NFKD
option The normalization option; UNICODE_3_2
Returns:
The normalized String
Throws:
java.lang.NullPointerException If src or form is null.
    public static String normalize(CharSequence src,
                                   java.text.Normalizer.Form form,
                                   int option) {
        return NormalizerBase.normalize(src.toString(), formoption);
    };

    
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 java.text.Normalizer.Form.NFC, java.text.Normalizer.Form.NFD, java.text.Normalizer.Form.NFKC, java.text.Normalizer.Form.NFKD
option The normalization option; UNICODE_3_2
Returns:
true if the sequence of char values is normalized; false otherwise.
Throws:
java.lang.NullPointerException If src or form is null.
    public static boolean isNormalized(CharSequence src,
                                       java.text.Normalizer.Form form,
                                       int option) {
        return NormalizerBase.isNormalized(src.toString(), formoption);
    }

    
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 final int getCombiningClass(int ch) {
        return NormalizerImpl.getCombiningClass(ch);
    }
New to GrepCode? Check out our FAQ X