harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mloe...@apache.org
Subject svn commit: r407772 [1/2] - in /incubator/harmony/enhanced/classlib/trunk/modules/luni/src: main/java/java/lang/Character.java test/java/org/apache/harmony/tests/java/lang/Character_UnicodeBlockTest.java
Date Fri, 19 May 2006 11:40:34 GMT
Author: mloenko
Date: Fri May 19 04:40:33 2006
New Revision: 407772

URL: http://svn.apache.org/viewvc?rev=407772&view=rev
Log:
fixes for HARMONY-460
[classlib][luni] Uplift java.lang.Character.UnicodeBlock to Java 5

Added:
    incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/tests/java/lang/Character_UnicodeBlockTest.java
Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/Character.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/Character.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/Character.java?rev=407772&r1=407771&r2=407772&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/Character.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/Character.java Fri May 19 04:40:33 2006
@@ -16,6 +16,8 @@
 package java.lang;
 
 import java.io.Serializable;
+import java.util.SortedMap;
+import java.util.TreeMap;
 
 import org.apache.harmony.luni.util.BinarySearch;
 
@@ -552,539 +554,1084 @@
 		}
 	}
 
-	/*
-	 * UnicodeBlock represents a block of related Unicode characters.
+	/**
+	 * Blocks of characters, as defined by the Unicode 4.0.1 specification. 
+     * @since 1.2
 	 */
-	public static final class UnicodeBlock extends Subset {
-		UnicodeBlock(String string) {
-			super(string);
-		}
-
-		/**
-		 * Answers the UnicodeBlock which contains the specified character.
-		 * 
-		 * @param c
-		 *            the character
-		 * @return the UnicodeBlock containing the character, or null if the
-		 *         character does not belong to any block
-		 */
-		public static UnicodeBlock of(char c) {
-			int index = BinarySearch.binarySearchRange(starts, c);
-			return blocks[index];
-		}
-
-		/*
-		 * Unicode block constant as defined by the Unicode 2.0 standard.
-		 */
-		public static final UnicodeBlock ALPHABETIC_PRESENTATION_FORMS = new UnicodeBlock(
-				"ALPHABETIC_PRESENTATION_FORMS");
-
-		/*
-		 * Unicode block constant as defined by the Unicode 2.0 standard.
-		 */
-		public static final UnicodeBlock ARABIC = new UnicodeBlock("ARABIC");
-
-		/*
-		 * Unicode block constant as defined by the Unicode 2.0 standard.
-		 */
-		public static final UnicodeBlock ARABIC_PRESENTATION_FORMS_A = new UnicodeBlock(
-				"ARABIC_PRESENTATION_FORMS_A");
-
-		/*
-		 * Unicode block constant as defined by the Unicode 2.0 standard.
-		 */
-		public static final UnicodeBlock ARABIC_PRESENTATION_FORMS_B = new UnicodeBlock(
-				"ARABIC_PRESENTATION_FORMS_B");
-
-		/*
-		 * Unicode block constant as defined by the Unicode 2.0 standard.
-		 */
-		public static final UnicodeBlock ARMENIAN = new UnicodeBlock("ARMENIAN");
-
-		/*
-		 * Unicode block constant as defined by the Unicode 2.0 standard.
-		 */
-		public static final UnicodeBlock ARROWS = new UnicodeBlock("ARROWS");
-
-		/*
-		 * Unicode block constant as defined by the Unicode 2.0 standard.
-		 */
-		public static final UnicodeBlock BASIC_LATIN = new UnicodeBlock(
-				"BASIC_LATIN");
-
-		/*
-		 * Unicode block constant as defined by the Unicode 2.0 standard.
-		 */
-		public static final UnicodeBlock BENGALI = new UnicodeBlock("BENGALI");
-
-		/*
-		 * Unicode block constant as defined by the Unicode 2.0 standard.
-		 */
-		public static final UnicodeBlock BLOCK_ELEMENTS = new UnicodeBlock(
-				"BLOCK_ELEMENTS");
-
-		/*
-		 * Unicode block constant as defined by the Unicode 2.0 standard.
-		 */
-		public static final UnicodeBlock BOPOMOFO = new UnicodeBlock("BOPOMOFO");
-
-		/*
-		 * Unicode block constant as defined by the Unicode 2.0 standard.
-		 */
-		public static final UnicodeBlock BOX_DRAWING = new UnicodeBlock(
-				"BOX_DRAWING");
-
-		/*
-		 * Unicode block constant as defined by the Unicode 2.0 standard.
-		 */
-		public static final UnicodeBlock CJK_COMPATIBILITY = new UnicodeBlock(
-				"CJK_COMPATIBILITY");
-
-		/*
-		 * Unicode block constant as defined by the Unicode 2.0 standard.
-		 */
-		public static final UnicodeBlock CJK_COMPATIBILITY_FORMS = new UnicodeBlock(
-				"CJK_COMPATIBILITY_FORMS");
-
-		/*
-		 * Unicode block constant as defined by the Unicode 2.0 standard.
-		 */
-		public static final UnicodeBlock CJK_COMPATIBILITY_IDEOGRAPHS = new UnicodeBlock(
-				"CJK_COMPATIBILITY_IDEOGRAPHS");
-
-		/*
-		 * Unicode block constant as defined by the Unicode 2.0 standard.
-		 */
-		public static final UnicodeBlock CJK_SYMBOLS_AND_PUNCTUATION = new UnicodeBlock(
-				"CJK_SYMBOLS_AND_PUNCTUATION");
-
-		/*
-		 * Unicode block constant as defined by the Unicode 2.0 standard.
-		 */
-		public static final UnicodeBlock CJK_UNIFIED_IDEOGRAPHS = new UnicodeBlock(
-				"CJK_UNIFIED_IDEOGRAPHS");
-
-		/*
-		 * Unicode block constant as defined by the Unicode 2.0 standard.
-		 */
-		public static final UnicodeBlock COMBINING_DIACRITICAL_MARKS = new UnicodeBlock(
-				"COMBINING_DIACRITICAL_MARKS");
-
-		/*
-		 * Unicode block constant as defined by the Unicode 2.0 standard.
-		 */
-		public static final UnicodeBlock COMBINING_HALF_MARKS = new UnicodeBlock(
-				"COMBINING_HALF_MARKS");
-
-		/*
-		 * Unicode block constant as defined by the Unicode 2.0 standard.
-		 */
-		public static final UnicodeBlock COMBINING_MARKS_FOR_SYMBOLS = new UnicodeBlock(
-				"COMBINING_MARKS_FOR_SYMBOLS");
-
-		/*
-		 * Unicode block constant as defined by the Unicode 2.0 standard.
-		 */
-		public static final UnicodeBlock CONTROL_PICTURES = new UnicodeBlock(
-				"CONTROL_PICTURES");
-
-		/*
-		 * Unicode block constant as defined by the Unicode 2.0 standard.
-		 */
-		public static final UnicodeBlock CURRENCY_SYMBOLS = new UnicodeBlock(
-				"CURRENCY_SYMBOLS");
-
-		/*
-		 * Unicode block constant as defined by the Unicode 2.0 standard.
-		 */
-		public static final UnicodeBlock CYRILLIC = new UnicodeBlock("CYRILLIC");
-
-		/*
-		 * Unicode block constant as defined by the Unicode 2.0 standard.
-		 */
-		public static final UnicodeBlock DEVANAGARI = new UnicodeBlock(
-				"DEVANAGARI");
-
-		/*
-		 * Unicode block constant as defined by the Unicode 2.0 standard.
-		 */
-		public static final UnicodeBlock DINGBATS = new UnicodeBlock("DINGBATS");
-
-		/*
-		 * Unicode block constant as defined by the Unicode 2.0 standard.
-		 */
-		public static final UnicodeBlock ENCLOSED_ALPHANUMERICS = new UnicodeBlock(
-				"ENCLOSED_ALPHANUMERICS");
-
-		/*
-		 * Unicode block constant as defined by the Unicode 2.0 standard.
-		 */
-		public static final UnicodeBlock ENCLOSED_CJK_LETTERS_AND_MONTHS = new UnicodeBlock(
-				"ENCLOSED_CJK_LETTERS_AND_MONTHS");
-
-		/*
-		 * Unicode block constant as defined by the Unicode 2.0 standard.
-		 */
-		public static final UnicodeBlock GENERAL_PUNCTUATION = new UnicodeBlock(
-				"GENERAL_PUNCTUATION");
-
-		/*
-		 * Unicode block constant as defined by the Unicode 2.0 standard.
-		 */
-		public static final UnicodeBlock GEOMETRIC_SHAPES = new UnicodeBlock(
-				"GEOMETRIC_SHAPES");
-
-		/*
-		 * Unicode block constant as defined by the Unicode 2.0 standard.
-		 */
-		public static final UnicodeBlock GEORGIAN = new UnicodeBlock("GEORGIAN");
-
-		/*
-		 * Unicode block constant as defined by the Unicode 2.0 standard.
-		 */
-		public static final UnicodeBlock GREEK = new UnicodeBlock("GREEK");
-
-		/*
-		 * Unicode block constant as defined by the Unicode 2.0 standard.
-		 */
-		public static final UnicodeBlock GREEK_EXTENDED = new UnicodeBlock(
-				"GREEK_EXTENDED");
-
-		/*
-		 * Unicode block constant as defined by the Unicode 2.0 standard.
-		 */
-		public static final UnicodeBlock GUJARATI = new UnicodeBlock("GUJARATI");
-
-		/*
-		 * Unicode block constant as defined by the Unicode 2.0 standard.
-		 */
-		public static final UnicodeBlock GURMUKHI = new UnicodeBlock("GURMUKHI");
-
-		/*
-		 * Unicode block constant as defined by the Unicode 2.0 standard.
-		 */
-		public static final UnicodeBlock HALFWIDTH_AND_FULLWIDTH_FORMS = new UnicodeBlock(
-				"HALFWIDTH_AND_FULLWIDTH_FORMS");
-
-		/*
-		 * Unicode block constant as defined by the Unicode 2.0 standard.
-		 */
-		public static final UnicodeBlock HANGUL_COMPATIBILITY_JAMO = new UnicodeBlock(
-				"HANGUL_COMPATIBILITY_JAMO");
-
-		/*
-		 * Unicode block constant as defined by the Unicode 2.0 standard.
-		 */
-		public static final UnicodeBlock HANGUL_JAMO = new UnicodeBlock(
-				"HANGUL_JAMO");
-
-		/*
-		 * Unicode block constant as defined by the Unicode 2.0 standard.
-		 */
-		public static final UnicodeBlock HANGUL_SYLLABLES = new UnicodeBlock(
-				"HANGUL_SYLLABLES");
-
-		/*
-		 * Unicode block constant as defined by the Unicode 2.0 standard.
-		 */
-		public static final UnicodeBlock HEBREW = new UnicodeBlock("HEBREW");
-
-		/*
-		 * Unicode block constant as defined by the Unicode 2.0 standard.
-		 */
-		public static final UnicodeBlock HIRAGANA = new UnicodeBlock("HIRAGANA");
-
-		/*
-		 * Unicode block constant as defined by the Unicode 2.0 standard.
-		 */
-		public static final UnicodeBlock IPA_EXTENSIONS = new UnicodeBlock(
-				"IPA_EXTENSIONS");
-
-		/*
-		 * Unicode block constant as defined by the Unicode 2.0 standard.
-		 */
-		public static final UnicodeBlock KANBUN = new UnicodeBlock("KANBUN");
-
-		/*
-		 * Unicode block constant as defined by the Unicode 2.0 standard.
-		 */
-		public static final UnicodeBlock KANNADA = new UnicodeBlock("KANNADA");
-
-		/*
-		 * Unicode block constant as defined by the Unicode 2.0 standard.
-		 */
-		public static final UnicodeBlock KATAKANA = new UnicodeBlock("KATAKANA");
-
-		/*
-		 * Unicode block constant as defined by the Unicode 2.0 standard.
-		 */
-		public static final UnicodeBlock LAO = new UnicodeBlock("LAO");
-
-		/*
-		 * Unicode block constant as defined by the Unicode 2.0 standard.
-		 */
-		public static final UnicodeBlock LATIN_1_SUPPLEMENT = new UnicodeBlock(
-				"LATIN_1_SUPPLEMENT");
-
-		/*
-		 * Unicode block constant as defined by the Unicode 2.0 standard.
-		 */
-		public static final UnicodeBlock LATIN_EXTENDED_A = new UnicodeBlock(
-				"LATIN_EXTENDED_A");
-
-		/*
-		 * Unicode block constant as defined by the Unicode 2.0 standard.
-		 */
-		public static final UnicodeBlock LATIN_EXTENDED_ADDITIONAL = new UnicodeBlock(
-				"LATIN_EXTENDED_ADDITIONAL");
-
-		/*
-		 * Unicode block constant as defined by the Unicode 2.0 standard.
-		 */
-		public static final UnicodeBlock LATIN_EXTENDED_B = new UnicodeBlock(
-				"LATIN_EXTENDED_B");
-
-		/*
-		 * Unicode block constant as defined by the Unicode 2.0 standard.
-		 */
-		public static final UnicodeBlock LETTERLIKE_SYMBOLS = new UnicodeBlock(
-				"LETTERLIKE_SYMBOLS");
-
-		/*
-		 * Unicode block constant as defined by the Unicode 2.0 standard.
-		 */
-		public static final UnicodeBlock MALAYALAM = new UnicodeBlock(
-				"MALAYALAM");
-
-		/*
-		 * Unicode block constant as defined by the Unicode 2.0 standard.
-		 */
-		public static final UnicodeBlock MATHEMATICAL_OPERATORS = new UnicodeBlock(
-				"MATHEMATICAL_OPERATORS");
-
-		/*
-		 * Unicode block constant as defined by the Unicode 2.0 standard.
-		 */
-		public static final UnicodeBlock MISCELLANEOUS_SYMBOLS = new UnicodeBlock(
-				"MISCELLANEOUS_SYMBOLS");
-
-		/*
-		 * Unicode block constant as defined by the Unicode 2.0 standard.
-		 */
-		public static final UnicodeBlock MISCELLANEOUS_TECHNICAL = new UnicodeBlock(
-				"MISCELLANEOUS_TECHNICAL");
-
-		/*
-		 * Unicode block constant as defined by the Unicode 2.0 standard.
-		 */
-		public static final UnicodeBlock NUMBER_FORMS = new UnicodeBlock(
-				"NUMBER_FORMS");
-
-		/*
-		 * Unicode block constant as defined by the Unicode 2.0 standard.
-		 */
-		public static final UnicodeBlock OPTICAL_CHARACTER_RECOGNITION = new UnicodeBlock(
-				"OPTICAL_CHARACTER_RECOGNITION");
-
-		/*
-		 * Unicode block constant as defined by the Unicode 2.0 standard.
-		 */
-		public static final UnicodeBlock ORIYA = new UnicodeBlock("ORIYA");
-
-		/*
-		 * Unicode block constant as defined by the Unicode 2.0 standard.
-		 */
-		public static final UnicodeBlock PRIVATE_USE_AREA = new UnicodeBlock(
-				"PRIVATE_USE_AREA");
-
-		/*
-		 * Unicode block constant as defined by the Unicode 2.0 standard.
-		 */
-		public static final UnicodeBlock SMALL_FORM_VARIANTS = new UnicodeBlock(
-				"SMALL_FORM_VARIANTS");
-
-		/*
-		 * Unicode block constant as defined by the Unicode 2.0 standard.
-		 */
-		public static final UnicodeBlock SPACING_MODIFIER_LETTERS = new UnicodeBlock(
-				"SPACING_MODIFIER_LETTERS");
-
-		/*
-		 * Unicode block constant as defined by the Unicode 2.0 standard.
-		 */
-		public static final UnicodeBlock SPECIALS = new UnicodeBlock("SPECIALS");
-
-		/*
-		 * Unicode block constant as defined by the Unicode 2.0 standard.
-		 */
-		public static final UnicodeBlock SUPERSCRIPTS_AND_SUBSCRIPTS = new UnicodeBlock(
-				"SUPERSCRIPTS_AND_SUBSCRIPTS");
-
-		/**
-		 * Unicode block constant as defined by the Unicode 2.0 standard.
-         * @deprecated Use HIGH_SURROGATES, HIGH_PRIVATE_USE_SURROGATES, LOW_SURROGATES.
-		 */
-		public static final UnicodeBlock SURROGATES_AREA = new UnicodeBlock(
-				"SURROGATES_AREA");
-
-		/*
-		 * Unicode block constant as defined by the Unicode 2.0 standard.
-		 */
-		public static final UnicodeBlock TAMIL = new UnicodeBlock("TAMIL");
-
-		/*
-		 * Unicode block constant as defined by the Unicode 2.0 standard.
-		 */
-		public static final UnicodeBlock TELUGU = new UnicodeBlock("TELUGU");
-
-		/*
-		 * Unicode block constant as defined by the Unicode 2.0 standard.
-		 */
-		public static final UnicodeBlock THAI = new UnicodeBlock("THAI");
-
-		/*
-		 * Unicode block constant as defined by the Unicode 2.0 standard.
-		 */
-		public static final UnicodeBlock TIBETAN = new UnicodeBlock("TIBETAN");
-
-		/*
-		 * Unicode block constant as defined by the Unicode 3.0 standard.
-		 */
-		public static final UnicodeBlock SYRIAC = new UnicodeBlock("SYRIAC");
-
-		/*
-		 * Unicode block constant as defined by the Unicode 3.0 standard.
-		 */
-		public static final UnicodeBlock THAANA = new UnicodeBlock("THAANA");
-
-		/*
-		 * Unicode block constant as defined by the Unicode 3.0 standard.
-		 */
-		public static final UnicodeBlock SINHALA = new UnicodeBlock("SINHALA");
-
-		/*
-		 * Unicode block constant as defined by the Unicode 3.0 standard.
-		 */
-		public static final UnicodeBlock MYANMAR = new UnicodeBlock("MYANMAR");
-
-		/*
-		 * Unicode block constant as defined by the Unicode 3.0 standard.
-		 */
-		public static final UnicodeBlock ETHIOPIC = new UnicodeBlock("ETHIOPIC");
-
-		/*
-		 * Unicode block constant as defined by the Unicode 3.0 standard.
-		 */
-		public static final UnicodeBlock CHEROKEE = new UnicodeBlock("CHEROKEE");
-
-		/*
-		 * Unicode block constant as defined by the Unicode 3.0 standard.
-		 */
-		public static final UnicodeBlock UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS = new UnicodeBlock(
-				"UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS");
-
-		/*
-		 * Unicode block constant as defined by the Unicode 3.0 standard.
-		 */
-		public static final UnicodeBlock OGHAM = new UnicodeBlock("OGHAM");
-
-		/*
-		 * Unicode block constant as defined by the Unicode 3.0 standard.
-		 */
-		public static final UnicodeBlock RUNIC = new UnicodeBlock("RUNIC");
-
-		/*
-		 * Unicode block constant as defined by the Unicode 3.0 standard.
-		 */
-		public static final UnicodeBlock KHMER = new UnicodeBlock("KHMER");
-
-		/*
-		 * Unicode block constant as defined by the Unicode 3.0 standard.
-		 */
-		public static final UnicodeBlock MONGOLIAN = new UnicodeBlock(
-				"MONGOLIAN");
-
-		/*
-		 * Unicode block constant as defined by the Unicode 3.0 standard.
-		 */
-		public static final UnicodeBlock BRAILLE_PATTERNS = new UnicodeBlock(
-				"BRAILLE_PATTERNS");
-
-		/*
-		 * Unicode block constant as defined by the Unicode 3.0 standard.
-		 */
-		public static final UnicodeBlock CJK_RADICALS_SUPPLEMENT = new UnicodeBlock(
-				"CJK_RADICALS_SUPPLEMENT");
-
-		/*
-		 * Unicode block constant as defined by the Unicode 3.0 standard.
-		 */
-		public static final UnicodeBlock KANGXI_RADICALS = new UnicodeBlock(
-				"KANGXI_RADICALS");
-
-		/*
-		 * Unicode block constant as defined by the Unicode 3.0 standard.
-		 */
-		public static final UnicodeBlock IDEOGRAPHIC_DESCRIPTION_CHARACTERS = new UnicodeBlock(
-				"IDEOGRAPHIC_DESCRIPTION_CHARACTERS");
-
-		/*
-		 * Unicode block constant as defined by the Unicode 3.0 standard.
-		 */
-		public static final UnicodeBlock BOPOMOFO_EXTENDED = new UnicodeBlock(
-				"BOPOMOFO_EXTENDED");
-
-		/*
-		 * Unicode block constant as defined by the Unicode 3.0 standard.
-		 */
-		public static final UnicodeBlock CJK_UNIFIED_IDEOGRAPHS_EXTENSION_A = new UnicodeBlock(
-				"CJK_UNIFIED_IDEOGRAPHS_EXTENSION_A");
-
-		/*
-		 * Unicode block constant as defined by the Unicode 3.0 standard.
-		 */
-		public static final UnicodeBlock YI_SYLLABLES = new UnicodeBlock(
-				"YI_SYLLABLES");
-
-		/*
-		 * Unicode block constant as defined by the Unicode 3.0 standard.
-		 */
-		public static final UnicodeBlock YI_RADICALS = new UnicodeBlock(
-				"YI_RADICALS");
-
-		static final UnicodeBlock[] blocks = new UnicodeBlock[] { BASIC_LATIN,
-				LATIN_1_SUPPLEMENT, LATIN_EXTENDED_A, LATIN_EXTENDED_B,
-				IPA_EXTENSIONS, SPACING_MODIFIER_LETTERS,
-				COMBINING_DIACRITICAL_MARKS, GREEK, CYRILLIC, null, ARMENIAN,
-				HEBREW, ARABIC, SYRIAC, null, THAANA, null, DEVANAGARI,
-				BENGALI, GURMUKHI, GUJARATI, ORIYA, TAMIL, TELUGU, KANNADA,
-				MALAYALAM, SINHALA, THAI, LAO, TIBETAN, MYANMAR, GEORGIAN,
-				HANGUL_JAMO, ETHIOPIC, null, CHEROKEE,
-				UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS, OGHAM, RUNIC, null,
-				KHMER, MONGOLIAN, null, LATIN_EXTENDED_ADDITIONAL,
-				GREEK_EXTENDED, GENERAL_PUNCTUATION,
-				SUPERSCRIPTS_AND_SUBSCRIPTS, CURRENCY_SYMBOLS,
-				COMBINING_MARKS_FOR_SYMBOLS, LETTERLIKE_SYMBOLS, NUMBER_FORMS,
-				ARROWS, MATHEMATICAL_OPERATORS, MISCELLANEOUS_TECHNICAL,
-				CONTROL_PICTURES, OPTICAL_CHARACTER_RECOGNITION,
-				ENCLOSED_ALPHANUMERICS, BOX_DRAWING, BLOCK_ELEMENTS,
-				GEOMETRIC_SHAPES, MISCELLANEOUS_SYMBOLS, DINGBATS, null,
-				BRAILLE_PATTERNS, null, CJK_RADICALS_SUPPLEMENT,
-				KANGXI_RADICALS, null, IDEOGRAPHIC_DESCRIPTION_CHARACTERS,
-				CJK_SYMBOLS_AND_PUNCTUATION, HIRAGANA, KATAKANA, BOPOMOFO,
-				HANGUL_COMPATIBILITY_JAMO, KANBUN, BOPOMOFO_EXTENDED, null,
-				ENCLOSED_CJK_LETTERS_AND_MONTHS, CJK_COMPATIBILITY,
-				CJK_UNIFIED_IDEOGRAPHS_EXTENSION_A, null,
-				CJK_UNIFIED_IDEOGRAPHS, YI_SYLLABLES, YI_RADICALS, null,
-				HANGUL_SYLLABLES, null, SURROGATES_AREA, PRIVATE_USE_AREA,
-				CJK_COMPATIBILITY_IDEOGRAPHS, ALPHABETIC_PRESENTATION_FORMS,
-				ARABIC_PRESENTATION_FORMS_A, null, COMBINING_HALF_MARKS,
-				CJK_COMPATIBILITY_FORMS, SMALL_FORM_VARIANTS,
-				ARABIC_PRESENTATION_FORMS_B, SPECIALS,
-				HALFWIDTH_AND_FULLWIDTH_FORMS, SPECIALS, null };
-
-		static final String starts = "\u0000\u0080\u0100\u0180\u0250\u02b0\u0300\u0370\u0400\u0500\u0530\u0590\u0600\u0700\u0750\u0780\u07c0\u0900\u0980\u0a00\u0a80\u0b00\u0b80\u0c00\u0c80\u0d00\u0d80\u0e00\u0e80\u0f00\u1000\u10a0\u1100\u1200\u1380\u13a0\u1400\u1680\u16a0\u1700\u1780\u1800\u18b0\u1e00\u1f00\u2000\u2070\u20a0\u20d0\u2100\u2150\u2190\u2200\u2300\u2400\u2440\u2460\u2500\u2580\u25a0\u2600\u2700\u27c0\u2800\u2900\u2e80\u2f00\u2fe0\u2ff0\u3000\u3040\u30a0\u3100\u3130\u3190\u31a0\u31c0\u3200\u3300\u3400\u4db6\u4e00\ua000\ua490\ua4d0\uac00\ud7a4\ud800\ue000\uf900\ufb00\ufb50\ufe00\ufe20\ufe30\ufe50\ufe70\ufeff\uff00\ufff0\ufffe";
-	}
+    public static final class UnicodeBlock extends Subset {
+        /**
+         * The "Surrogates Area" Unicode Block. 
+         * @deprecated As of Java 5, this block as been replaced by {@link #HIGH_SURROGATES}, {@link #HIGH_PRIVATE_USE_SURROGATES} and {@link #LOW_SURROGATES}.
+         */
+        public static final UnicodeBlock SURROGATES_AREA = new UnicodeBlock("SURROGATES_AREA", 0x0, 0x0);
+        /**
+         * The "Basic Latin" Unicode Block. 
+         * @since 1.2
+         */
+        public static final UnicodeBlock BASIC_LATIN = new UnicodeBlock("BASIC_LATIN", 0x0, 0x7f);
+        /**
+         * The "Latin-1 Supplement" Unicode Block. 
+         * @since 1.2
+         */
+        public static final UnicodeBlock LATIN_1_SUPPLEMENT = new UnicodeBlock("LATIN_1_SUPPLEMENT", 0x80, 0xff);
+        /**
+         * The "Latin Extended-A" Unicode Block. 
+         * @since 1.2
+         */
+        public static final UnicodeBlock LATIN_EXTENDED_A = new UnicodeBlock("LATIN_EXTENDED_A", 0x100, 0x17f);
+        /**
+         * The "Latin Extended-B" Unicode Block. 
+         * @since 1.2
+         */
+        public static final UnicodeBlock LATIN_EXTENDED_B = new UnicodeBlock("LATIN_EXTENDED_B", 0x180, 0x24f);
+        /**
+         * The "IPA Extensions" Unicode Block. 
+         * @since 1.2
+         */
+        public static final UnicodeBlock IPA_EXTENSIONS = new UnicodeBlock("IPA_EXTENSIONS", 0x250, 0x2af);
+        /**
+         * The "Spacing Modifier Letters" Unicode Block. 
+         * @since 1.2
+         */
+        public static final UnicodeBlock SPACING_MODIFIER_LETTERS = new UnicodeBlock("SPACING_MODIFIER_LETTERS", 0x2b0, 0x2ff);
+        /**
+         * The "Combining Diacritical Marks" Unicode Block. 
+         * @since 1.2
+         */
+        public static final UnicodeBlock COMBINING_DIACRITICAL_MARKS = new UnicodeBlock("COMBINING_DIACRITICAL_MARKS", 0x300, 0x36f);
+        /**
+         * The "Greek and Coptic" Unicode Block. Previously referred to as "Greek".
+         * @since 1.2
+         */
+        public static final UnicodeBlock GREEK = new UnicodeBlock("GREEK", 0x370, 0x3ff);
+        /**
+         * The "Cyrillic" Unicode Block. 
+         * @since 1.2
+         */
+        public static final UnicodeBlock CYRILLIC = new UnicodeBlock("CYRILLIC", 0x400, 0x4ff);
+        /**
+         * The "Cyrillic Supplement" Unicode Block. Previously referred to as "Cyrillic Supplementary".
+         * @since 1.5
+         */
+        public static final UnicodeBlock CYRILLIC_SUPPLEMENTARY = new UnicodeBlock("CYRILLIC_SUPPLEMENTARY", 0x500, 0x52f);
+        /**
+         * The "Armenian" Unicode Block. 
+         * @since 1.2
+         */
+        public static final UnicodeBlock ARMENIAN = new UnicodeBlock("ARMENIAN", 0x530, 0x58f);
+        /**
+         * The "Hebrew" Unicode Block. 
+         * @since 1.2
+         */
+        public static final UnicodeBlock HEBREW = new UnicodeBlock("HEBREW", 0x590, 0x5ff);
+        /**
+         * The "Arabic" Unicode Block. 
+         * @since 1.2
+         */
+        public static final UnicodeBlock ARABIC = new UnicodeBlock("ARABIC", 0x600, 0x6ff);
+        /**
+         * The "Syriac" Unicode Block. 
+         * @since 1.4
+         */
+        public static final UnicodeBlock SYRIAC = new UnicodeBlock("SYRIAC", 0x700, 0x74f);
+        /**
+         * The "Thaana" Unicode Block. 
+         * @since 1.4
+         */
+        public static final UnicodeBlock THAANA = new UnicodeBlock("THAANA", 0x780, 0x7bf);
+        /**
+         * The "Devanagari" Unicode Block. 
+         * @since 1.2
+         */
+        public static final UnicodeBlock DEVANAGARI = new UnicodeBlock("DEVANAGARI", 0x900, 0x97f);
+        /**
+         * The "Bengali" Unicode Block. 
+         * @since 1.2
+         */
+        public static final UnicodeBlock BENGALI = new UnicodeBlock("BENGALI", 0x980, 0x9ff);
+        /**
+         * The "Gurmukhi" Unicode Block. 
+         * @since 1.2
+         */
+        public static final UnicodeBlock GURMUKHI = new UnicodeBlock("GURMUKHI", 0xa00, 0xa7f);
+        /**
+         * The "Gujarati" Unicode Block. 
+         * @since 1.2
+         */
+        public static final UnicodeBlock GUJARATI = new UnicodeBlock("GUJARATI", 0xa80, 0xaff);
+        /**
+         * The "Oriya" Unicode Block. 
+         * @since 1.2
+         */
+        public static final UnicodeBlock ORIYA = new UnicodeBlock("ORIYA", 0xb00, 0xb7f);
+        /**
+         * The "Tamil" Unicode Block. 
+         * @since 1.2
+         */
+        public static final UnicodeBlock TAMIL = new UnicodeBlock("TAMIL", 0xb80, 0xbff);
+        /**
+         * The "Telugu" Unicode Block. 
+         * @since 1.2
+         */
+        public static final UnicodeBlock TELUGU = new UnicodeBlock("TELUGU", 0xc00, 0xc7f);
+        /**
+         * The "Kannada" Unicode Block. 
+         * @since 1.2
+         */
+        public static final UnicodeBlock KANNADA = new UnicodeBlock("KANNADA", 0xc80, 0xcff);
+        /**
+         * The "Malayalam" Unicode Block. 
+         * @since 1.2
+         */
+        public static final UnicodeBlock MALAYALAM = new UnicodeBlock("MALAYALAM", 0xd00, 0xd7f);
+        /**
+         * The "Sinhala" Unicode Block. 
+         * @since 1.4
+         */
+        public static final UnicodeBlock SINHALA = new UnicodeBlock("SINHALA", 0xd80, 0xdff);
+        /**
+         * The "Thai" Unicode Block. 
+         * @since 1.2
+         */
+        public static final UnicodeBlock THAI = new UnicodeBlock("THAI", 0xe00, 0xe7f);
+        /**
+         * The "Lao" Unicode Block. 
+         * @since 1.2
+         */
+        public static final UnicodeBlock LAO = new UnicodeBlock("LAO", 0xe80, 0xeff);
+        /**
+         * The "Tibetan" Unicode Block. 
+         * @since 1.2
+         */
+        public static final UnicodeBlock TIBETAN = new UnicodeBlock("TIBETAN", 0xf00, 0xfff);
+        /**
+         * The "Myanmar" Unicode Block. 
+         * @since 1.4
+         */
+        public static final UnicodeBlock MYANMAR = new UnicodeBlock("MYANMAR", 0x1000, 0x109f);
+        /**
+         * The "Georgian" Unicode Block. 
+         * @since 1.2
+         */
+        public static final UnicodeBlock GEORGIAN = new UnicodeBlock("GEORGIAN", 0x10a0, 0x10ff);
+        /**
+         * The "Hangul Jamo" Unicode Block. 
+         * @since 1.2
+         */
+        public static final UnicodeBlock HANGUL_JAMO = new UnicodeBlock("HANGUL_JAMO", 0x1100, 0x11ff);
+        /**
+         * The "Ethiopic" Unicode Block. 
+         * @since 1.4
+         */
+        public static final UnicodeBlock ETHIOPIC = new UnicodeBlock("ETHIOPIC", 0x1200, 0x137f);
+        /**
+         * The "Cherokee" Unicode Block. 
+         * @since 1.4
+         */
+        public static final UnicodeBlock CHEROKEE = new UnicodeBlock("CHEROKEE", 0x13a0, 0x13ff);
+        /**
+         * The "Unified Canadian Aboriginal Syllabics" Unicode Block. 
+         * @since 1.4
+         */
+        public static final UnicodeBlock UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS = new UnicodeBlock("UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS", 0x1400, 0x167f);
+        /**
+         * The "Ogham" Unicode Block. 
+         * @since 1.4
+         */
+        public static final UnicodeBlock OGHAM = new UnicodeBlock("OGHAM", 0x1680, 0x169f);
+        /**
+         * The "Runic" Unicode Block. 
+         * @since 1.4
+         */
+        public static final UnicodeBlock RUNIC = new UnicodeBlock("RUNIC", 0x16a0, 0x16ff);
+        /**
+         * The "Tagalog" Unicode Block. 
+         * @since 1.5
+         */
+        public static final UnicodeBlock TAGALOG = new UnicodeBlock("TAGALOG", 0x1700, 0x171f);
+        /**
+         * The "Hanunoo" Unicode Block. 
+         * @since 1.5
+         */
+        public static final UnicodeBlock HANUNOO = new UnicodeBlock("HANUNOO", 0x1720, 0x173f);
+        /**
+         * The "Buhid" Unicode Block. 
+         * @since 1.5
+         */
+        public static final UnicodeBlock BUHID = new UnicodeBlock("BUHID", 0x1740, 0x175f);
+        /**
+         * The "Tagbanwa" Unicode Block. 
+         * @since 1.5
+         */
+        public static final UnicodeBlock TAGBANWA = new UnicodeBlock("TAGBANWA", 0x1760, 0x177f);
+        /**
+         * The "Khmer" Unicode Block. 
+         * @since 1.4
+         */
+        public static final UnicodeBlock KHMER = new UnicodeBlock("KHMER", 0x1780, 0x17ff);
+        /**
+         * The "Mongolian" Unicode Block. 
+         * @since 1.4
+         */
+        public static final UnicodeBlock MONGOLIAN = new UnicodeBlock("MONGOLIAN", 0x1800, 0x18af);
+        /**
+         * The "Limbu" Unicode Block. 
+         * @since 1.5
+         */
+        public static final UnicodeBlock LIMBU = new UnicodeBlock("LIMBU", 0x1900, 0x194f);
+        /**
+         * The "Tai Le" Unicode Block. 
+         * @since 1.5
+         */
+        public static final UnicodeBlock TAI_LE = new UnicodeBlock("TAI_LE", 0x1950, 0x197f);
+        /**
+         * The "Khmer Symbols" Unicode Block. 
+         * @since 1.5
+         */
+        public static final UnicodeBlock KHMER_SYMBOLS = new UnicodeBlock("KHMER_SYMBOLS", 0x19e0, 0x19ff);
+        /**
+         * The "Phonetic Extensions" Unicode Block. 
+         * @since 1.5
+         */
+        public static final UnicodeBlock PHONETIC_EXTENSIONS = new UnicodeBlock("PHONETIC_EXTENSIONS", 0x1d00, 0x1d7f);
+        /**
+         * The "Latin Extended Additional" Unicode Block. 
+         * @since 1.2
+         */
+        public static final UnicodeBlock LATIN_EXTENDED_ADDITIONAL = new UnicodeBlock("LATIN_EXTENDED_ADDITIONAL", 0x1e00, 0x1eff);
+        /**
+         * The "Greek Extended" Unicode Block. 
+         * @since 1.2
+         */
+        public static final UnicodeBlock GREEK_EXTENDED = new UnicodeBlock("GREEK_EXTENDED", 0x1f00, 0x1fff);
+        /**
+         * The "General Punctuation" Unicode Block. 
+         * @since 1.2
+         */
+        public static final UnicodeBlock GENERAL_PUNCTUATION = new UnicodeBlock("GENERAL_PUNCTUATION", 0x2000, 0x206f);
+        /**
+         * The "Superscripts and Subscripts" Unicode Block. 
+         * @since 1.2
+         */
+        public static final UnicodeBlock SUPERSCRIPTS_AND_SUBSCRIPTS = new UnicodeBlock("SUPERSCRIPTS_AND_SUBSCRIPTS", 0x2070, 0x209f);
+        /**
+         * The "Currency Symbols" Unicode Block. 
+         * @since 1.2
+         */
+        public static final UnicodeBlock CURRENCY_SYMBOLS = new UnicodeBlock("CURRENCY_SYMBOLS", 0x20a0, 0x20cf);
+        /**
+         * The "Combining Diacritical Marks for Symbols" Unicode Block. Previously referred to as "Combining Marks for Symbols".
+         * @since 1.2
+         */
+        public static final UnicodeBlock COMBINING_MARKS_FOR_SYMBOLS = new UnicodeBlock("COMBINING_MARKS_FOR_SYMBOLS", 0x20d0, 0x20ff);
+        /**
+         * The "Letterlike Symbols" Unicode Block. 
+         * @since 1.2
+         */
+        public static final UnicodeBlock LETTERLIKE_SYMBOLS = new UnicodeBlock("LETTERLIKE_SYMBOLS", 0x2100, 0x214f);
+        /**
+         * The "Number Forms" Unicode Block. 
+         * @since 1.2
+         */
+        public static final UnicodeBlock NUMBER_FORMS = new UnicodeBlock("NUMBER_FORMS", 0x2150, 0x218f);
+        /**
+         * The "Arrows" Unicode Block. 
+         * @since 1.2
+         */
+        public static final UnicodeBlock ARROWS = new UnicodeBlock("ARROWS", 0x2190, 0x21ff);
+        /**
+         * The "Mathematical Operators" Unicode Block. 
+         * @since 1.2
+         */
+        public static final UnicodeBlock MATHEMATICAL_OPERATORS = new UnicodeBlock("MATHEMATICAL_OPERATORS", 0x2200, 0x22ff);
+        /**
+         * The "Miscellaneous Technical" Unicode Block. 
+         * @since 1.2
+         */
+        public static final UnicodeBlock MISCELLANEOUS_TECHNICAL = new UnicodeBlock("MISCELLANEOUS_TECHNICAL", 0x2300, 0x23ff);
+        /**
+         * The "Control Pictures" Unicode Block. 
+         * @since 1.2
+         */
+        public static final UnicodeBlock CONTROL_PICTURES = new UnicodeBlock("CONTROL_PICTURES", 0x2400, 0x243f);
+        /**
+         * The "Optical Character Recognition" Unicode Block. 
+         * @since 1.2
+         */
+        public static final UnicodeBlock OPTICAL_CHARACTER_RECOGNITION = new UnicodeBlock("OPTICAL_CHARACTER_RECOGNITION", 0x2440, 0x245f);
+        /**
+         * The "Enclosed Alphanumerics" Unicode Block. 
+         * @since 1.2
+         */
+        public static final UnicodeBlock ENCLOSED_ALPHANUMERICS = new UnicodeBlock("ENCLOSED_ALPHANUMERICS", 0x2460, 0x24ff);
+        /**
+         * The "Box Drawing" Unicode Block. 
+         * @since 1.2
+         */
+        public static final UnicodeBlock BOX_DRAWING = new UnicodeBlock("BOX_DRAWING", 0x2500, 0x257f);
+        /**
+         * The "Block Elements" Unicode Block. 
+         * @since 1.2
+         */
+        public static final UnicodeBlock BLOCK_ELEMENTS = new UnicodeBlock("BLOCK_ELEMENTS", 0x2580, 0x259f);
+        /**
+         * The "Geometric Shapes" Unicode Block. 
+         * @since 1.2
+         */
+        public static final UnicodeBlock GEOMETRIC_SHAPES = new UnicodeBlock("GEOMETRIC_SHAPES", 0x25a0, 0x25ff);
+        /**
+         * The "Miscellaneous Symbols" Unicode Block. 
+         * @since 1.2
+         */
+        public static final UnicodeBlock MISCELLANEOUS_SYMBOLS = new UnicodeBlock("MISCELLANEOUS_SYMBOLS", 0x2600, 0x26ff);
+        /**
+         * The "Dingbats" Unicode Block. 
+         * @since 1.2
+         */
+        public static final UnicodeBlock DINGBATS = new UnicodeBlock("DINGBATS", 0x2700, 0x27bf);
+        /**
+         * The "Miscellaneous Mathematical Symbols-A" Unicode Block. 
+         * @since 1.5
+         */
+        public static final UnicodeBlock MISCELLANEOUS_MATHEMATICAL_SYMBOLS_A = new UnicodeBlock("MISCELLANEOUS_MATHEMATICAL_SYMBOLS_A", 0x27c0, 0x27ef);
+        /**
+         * The "Supplemental Arrows-A" Unicode Block. 
+         * @since 1.5
+         */
+        public static final UnicodeBlock SUPPLEMENTAL_ARROWS_A = new UnicodeBlock("SUPPLEMENTAL_ARROWS_A", 0x27f0, 0x27ff);
+        /**
+         * The "Braille Patterns" Unicode Block. 
+         * @since 1.4
+         */
+        public static final UnicodeBlock BRAILLE_PATTERNS = new UnicodeBlock("BRAILLE_PATTERNS", 0x2800, 0x28ff);
+        /**
+         * The "Supplemental Arrows-B" Unicode Block. 
+         * @since 1.5
+         */
+        public static final UnicodeBlock SUPPLEMENTAL_ARROWS_B = new UnicodeBlock("SUPPLEMENTAL_ARROWS_B", 0x2900, 0x297f);
+        /**
+         * The "Miscellaneous Mathematical Symbols-B" Unicode Block. 
+         * @since 1.5
+         */
+        public static final UnicodeBlock MISCELLANEOUS_MATHEMATICAL_SYMBOLS_B = new UnicodeBlock("MISCELLANEOUS_MATHEMATICAL_SYMBOLS_B", 0x2980, 0x29ff);
+        /**
+         * The "Supplemental Mathematical Operators" Unicode Block. 
+         * @since 1.5
+         */
+        public static final UnicodeBlock SUPPLEMENTAL_MATHEMATICAL_OPERATORS = new UnicodeBlock("SUPPLEMENTAL_MATHEMATICAL_OPERATORS", 0x2a00, 0x2aff);
+        /**
+         * The "Miscellaneous Symbols and Arrows" Unicode Block. 
+         * @since 1.2
+         */
+        public static final UnicodeBlock MISCELLANEOUS_SYMBOLS_AND_ARROWS = new UnicodeBlock("MISCELLANEOUS_SYMBOLS_AND_ARROWS", 0x2b00, 0x2bff);
+        /**
+         * The "CJK Radicals Supplement" Unicode Block. 
+         * @since 1.4
+         */
+        public static final UnicodeBlock CJK_RADICALS_SUPPLEMENT = new UnicodeBlock("CJK_RADICALS_SUPPLEMENT", 0x2e80, 0x2eff);
+        /**
+         * The "Kangxi Radicals" Unicode Block. 
+         * @since 1.4
+         */
+        public static final UnicodeBlock KANGXI_RADICALS = new UnicodeBlock("KANGXI_RADICALS", 0x2f00, 0x2fdf);
+        /**
+         * The "Ideographic Description Characters" Unicode Block. 
+         * @since 1.4
+         */
+        public static final UnicodeBlock IDEOGRAPHIC_DESCRIPTION_CHARACTERS = new UnicodeBlock("IDEOGRAPHIC_DESCRIPTION_CHARACTERS", 0x2ff0, 0x2fff);
+        /**
+         * The "CJK Symbols and Punctuation" Unicode Block. 
+         * @since 1.2
+         */
+        public static final UnicodeBlock CJK_SYMBOLS_AND_PUNCTUATION = new UnicodeBlock("CJK_SYMBOLS_AND_PUNCTUATION", 0x3000, 0x303f);
+        /**
+         * The "Hiragana" Unicode Block. 
+         * @since 1.2
+         */
+        public static final UnicodeBlock HIRAGANA = new UnicodeBlock("HIRAGANA", 0x3040, 0x309f);
+        /**
+         * The "Katakana" Unicode Block. 
+         * @since 1.2
+         */
+        public static final UnicodeBlock KATAKANA = new UnicodeBlock("KATAKANA", 0x30a0, 0x30ff);
+        /**
+         * The "Bopomofo" Unicode Block. 
+         * @since 1.2
+         */
+        public static final UnicodeBlock BOPOMOFO = new UnicodeBlock("BOPOMOFO", 0x3100, 0x312f);
+        /**
+         * The "Hangul Compatibility Jamo" Unicode Block. 
+         * @since 1.2
+         */
+        public static final UnicodeBlock HANGUL_COMPATIBILITY_JAMO = new UnicodeBlock("HANGUL_COMPATIBILITY_JAMO", 0x3130, 0x318f);
+        /**
+         * The "Kanbun" Unicode Block. 
+         * @since 1.2
+         */
+        public static final UnicodeBlock KANBUN = new UnicodeBlock("KANBUN", 0x3190, 0x319f);
+        /**
+         * The "Bopomofo Extended" Unicode Block. 
+         * @since 1.4
+         */
+        public static final UnicodeBlock BOPOMOFO_EXTENDED = new UnicodeBlock("BOPOMOFO_EXTENDED", 0x31a0, 0x31bf);
+        /**
+         * The "Katakana Phonetic Extensions" Unicode Block. 
+         * @since 1.5
+         */
+        public static final UnicodeBlock KATAKANA_PHONETIC_EXTENSIONS = new UnicodeBlock("KATAKANA_PHONETIC_EXTENSIONS", 0x31f0, 0x31ff);
+        /**
+         * The "Enclosed CJK Letters and Months" Unicode Block. 
+         * @since 1.2
+         */
+        public static final UnicodeBlock ENCLOSED_CJK_LETTERS_AND_MONTHS = new UnicodeBlock("ENCLOSED_CJK_LETTERS_AND_MONTHS", 0x3200, 0x32ff);
+        /**
+         * The "CJK Compatibility" Unicode Block. 
+         * @since 1.2
+         */
+        public static final UnicodeBlock CJK_COMPATIBILITY = new UnicodeBlock("CJK_COMPATIBILITY", 0x3300, 0x33ff);
+        /**
+         * The "CJK Unified Ideographs Extension A" Unicode Block. 
+         * @since 1.4
+         */
+        public static final UnicodeBlock CJK_UNIFIED_IDEOGRAPHS_EXTENSION_A = new UnicodeBlock("CJK_UNIFIED_IDEOGRAPHS_EXTENSION_A", 0x3400, 0x4dbf);
+        /**
+         * The "Yijing Hexagram Symbols" Unicode Block. 
+         * @since 1.5
+         */
+        public static final UnicodeBlock YIJING_HEXAGRAM_SYMBOLS = new UnicodeBlock("YIJING_HEXAGRAM_SYMBOLS", 0x4dc0, 0x4dff);
+        /**
+         * The "CJK Unified Ideographs" Unicode Block. 
+         * @since 1.2
+         */
+        public static final UnicodeBlock CJK_UNIFIED_IDEOGRAPHS = new UnicodeBlock("CJK_UNIFIED_IDEOGRAPHS", 0x4e00, 0x9fff);
+        /**
+         * The "Yi Syllables" Unicode Block. 
+         * @since 1.4
+         */
+        public static final UnicodeBlock YI_SYLLABLES = new UnicodeBlock("YI_SYLLABLES", 0xa000, 0xa48f);
+        /**
+         * The "Yi Radicals" Unicode Block. 
+         * @since 1.4
+         */
+        public static final UnicodeBlock YI_RADICALS = new UnicodeBlock("YI_RADICALS", 0xa490, 0xa4cf);
+        /**
+         * The "Hangul Syllables" Unicode Block. 
+         * @since 1.2
+         */
+        public static final UnicodeBlock HANGUL_SYLLABLES = new UnicodeBlock("HANGUL_SYLLABLES", 0xac00, 0xd7af);
+        /**
+         * The "High Surrogates" Unicode Block. 
+         * This block represents code point values in the high surrogate range 0xD800 to 0xDB7F @since 1.5
+         */
+        public static final UnicodeBlock HIGH_SURROGATES = new UnicodeBlock("HIGH_SURROGATES", 0xd800, 0xdb7f);
+        /**
+         * The "High Private Use Surrogates" Unicode Block. 
+         * This block represents code point values in the high surrogate range 0xDB80 to 0xDBFF @since 1.5
+         */
+        public static final UnicodeBlock HIGH_PRIVATE_USE_SURROGATES = new UnicodeBlock("HIGH_PRIVATE_USE_SURROGATES", 0xdb80, 0xdbff);
+        /**
+         * The "Low Surrogates" Unicode Block. 
+         * This block represents code point values in the low surrogate range 0xDC00 to 0xDFFF @since 1.5
+         */
+        public static final UnicodeBlock LOW_SURROGATES = new UnicodeBlock("LOW_SURROGATES", 0xdc00, 0xdfff);
+        /**
+         * The "Private Use Area" Unicode Block. 
+         * @since 1.2
+         */
+        public static final UnicodeBlock PRIVATE_USE_AREA = new UnicodeBlock("PRIVATE_USE_AREA", 0xe000, 0xf8ff);
+        /**
+         * The "CJK Compatibility Ideographs" Unicode Block. 
+         * @since 1.2
+         */
+        public static final UnicodeBlock CJK_COMPATIBILITY_IDEOGRAPHS = new UnicodeBlock("CJK_COMPATIBILITY_IDEOGRAPHS", 0xf900, 0xfaff);
+        /**
+         * The "Alphabetic Presentation Forms" Unicode Block. 
+         * @since 1.2
+         */
+        public static final UnicodeBlock ALPHABETIC_PRESENTATION_FORMS = new UnicodeBlock("ALPHABETIC_PRESENTATION_FORMS", 0xfb00, 0xfb4f);
+        /**
+         * The "Arabic Presentation Forms-A" Unicode Block. 
+         * @since 1.2
+         */
+        public static final UnicodeBlock ARABIC_PRESENTATION_FORMS_A = new UnicodeBlock("ARABIC_PRESENTATION_FORMS_A", 0xfb50, 0xfdff);
+        /**
+         * The "Variation Selectors" Unicode Block. 
+         * @since 1.5
+         */
+        public static final UnicodeBlock VARIATION_SELECTORS = new UnicodeBlock("VARIATION_SELECTORS", 0xfe00, 0xfe0f);
+        /**
+         * The "Combining Half Marks" Unicode Block. 
+         * @since 1.2
+         */
+        public static final UnicodeBlock COMBINING_HALF_MARKS = new UnicodeBlock("COMBINING_HALF_MARKS", 0xfe20, 0xfe2f);
+        /**
+         * The "CJK Compatibility Forms" Unicode Block. 
+         * @since 1.2
+         */
+        public static final UnicodeBlock CJK_COMPATIBILITY_FORMS = new UnicodeBlock("CJK_COMPATIBILITY_FORMS", 0xfe30, 0xfe4f);
+        /**
+         * The "Small Form Variants" Unicode Block. 
+         * @since 1.2
+         */
+        public static final UnicodeBlock SMALL_FORM_VARIANTS = new UnicodeBlock("SMALL_FORM_VARIANTS", 0xfe50, 0xfe6f);
+        /**
+         * The "Arabic Presentation Forms-B" Unicode Block. 
+         * @since 1.2
+         */
+        public static final UnicodeBlock ARABIC_PRESENTATION_FORMS_B = new UnicodeBlock("ARABIC_PRESENTATION_FORMS_B", 0xfe70, 0xfeff);
+        /**
+         * The "Halfwidth and Fullwidth Forms" Unicode Block. 
+         * @since 1.2
+         */
+        public static final UnicodeBlock HALFWIDTH_AND_FULLWIDTH_FORMS = new UnicodeBlock("HALFWIDTH_AND_FULLWIDTH_FORMS", 0xff00, 0xffef);
+        /**
+         * The "Specials" Unicode Block. 
+         * @since 1.2
+         */
+        public static final UnicodeBlock SPECIALS = new UnicodeBlock("SPECIALS", 0xfff0, 0xffff);
+        /**
+         * The "Linear B Syllabary" Unicode Block. 
+         * @since 1.2
+         */
+        public static final UnicodeBlock LINEAR_B_SYLLABARY = new UnicodeBlock("LINEAR_B_SYLLABARY", 0x10000, 0x1007f);
+        /**
+         * The "Linear B Ideograms" Unicode Block. 
+         * @since 1.5
+         */
+        public static final UnicodeBlock LINEAR_B_IDEOGRAMS = new UnicodeBlock("LINEAR_B_IDEOGRAMS", 0x10080, 0x100ff);
+        /**
+         * The "Aegean Numbers" Unicode Block. 
+         * @since 1.5
+         */
+        public static final UnicodeBlock AEGEAN_NUMBERS = new UnicodeBlock("AEGEAN_NUMBERS", 0x10100, 0x1013f);
+        /**
+         * The "Old Italic" Unicode Block. 
+         * @since 1.5
+         */
+        public static final UnicodeBlock OLD_ITALIC = new UnicodeBlock("OLD_ITALIC", 0x10300, 0x1032f);
+        /**
+         * The "Gothic" Unicode Block. 
+         * @since 1.5
+         */
+        public static final UnicodeBlock GOTHIC = new UnicodeBlock("GOTHIC", 0x10330, 0x1034f);
+        /**
+         * The "Ugaritic" Unicode Block. 
+         * @since 1.5
+         */
+        public static final UnicodeBlock UGARITIC = new UnicodeBlock("UGARITIC", 0x10380, 0x1039f);
+        /**
+         * The "Deseret" Unicode Block. 
+         * @since 1.5
+         */
+        public static final UnicodeBlock DESERET = new UnicodeBlock("DESERET", 0x10400, 0x1044f);
+        /**
+         * The "Shavian" Unicode Block. 
+         * @since 1.5
+         */
+        public static final UnicodeBlock SHAVIAN = new UnicodeBlock("SHAVIAN", 0x10450, 0x1047f);
+        /**
+         * The "Osmanya" Unicode Block. 
+         * @since 1.5
+         */
+        public static final UnicodeBlock OSMANYA = new UnicodeBlock("OSMANYA", 0x10480, 0x104af);
+        /**
+         * The "Cypriot Syllabary" Unicode Block. 
+         * @since 1.5
+         */
+        public static final UnicodeBlock CYPRIOT_SYLLABARY = new UnicodeBlock("CYPRIOT_SYLLABARY", 0x10800, 0x1083f);
+        /**
+         * The "Byzantine Musical Symbols" Unicode Block. 
+         * @since 1.5
+         */
+        public static final UnicodeBlock BYZANTINE_MUSICAL_SYMBOLS = new UnicodeBlock("BYZANTINE_MUSICAL_SYMBOLS", 0x1d000, 0x1d0ff);
+        /**
+         * The "Musical Symbols" Unicode Block. 
+         * @since 1.5
+         */
+        public static final UnicodeBlock MUSICAL_SYMBOLS = new UnicodeBlock("MUSICAL_SYMBOLS", 0x1d100, 0x1d1ff);
+        /**
+         * The "Tai Xuan Jing Symbols" Unicode Block. 
+         * @since 1.5
+         */
+        public static final UnicodeBlock TAI_XUAN_JING_SYMBOLS = new UnicodeBlock("TAI_XUAN_JING_SYMBOLS", 0x1d300, 0x1d35f);
+        /**
+         * The "Mathematical Alphanumeric Symbols" Unicode Block. 
+         * @since 1.5
+         */
+        public static final UnicodeBlock MATHEMATICAL_ALPHANUMERIC_SYMBOLS = new UnicodeBlock("MATHEMATICAL_ALPHANUMERIC_SYMBOLS", 0x1d400, 0x1d7ff);
+        /**
+         * The "CJK Unified Ideographs Extension B" Unicode Block. 
+         * @since 1.5
+         */
+        public static final UnicodeBlock CJK_UNIFIED_IDEOGRAPHS_EXTENSION_B = new UnicodeBlock("CJK_UNIFIED_IDEOGRAPHS_EXTENSION_B", 0x20000, 0x2a6df);
+        /**
+         * The "CJK Compatibility Ideographs Supplement" Unicode Block. 
+         * @since 1.5
+         */
+        public static final UnicodeBlock CJK_COMPATIBILITY_IDEOGRAPHS_SUPPLEMENT = new UnicodeBlock("CJK_COMPATIBILITY_IDEOGRAPHS_SUPPLEMENT", 0x2f800, 0x2fa1f);
+        /**
+         * The "Tags" Unicode Block. 
+         * @since 1.5
+         */
+        public static final UnicodeBlock TAGS = new UnicodeBlock("TAGS", 0xe0000, 0xe007f);
+        /**
+         * The "Variation Selectors Supplement" Unicode Block. 
+         * @since 1.5
+         */
+        public static final UnicodeBlock VARIATION_SELECTORS_SUPPLEMENT = new UnicodeBlock("VARIATION_SELECTORS_SUPPLEMENT", 0xe0100, 0xe01ef);
+        /**
+         * The "Supplementary Private Use Area-A" Unicode Block. 
+         * @since 1.5
+         */
+        public static final UnicodeBlock SUPPLEMENTARY_PRIVATE_USE_AREA_A = new UnicodeBlock("SUPPLEMENTARY_PRIVATE_USE_AREA_A", 0xf0000, 0xfffff);
+        /**
+         * The "Supplementary Private Use Area-B" Unicode Block. 
+         * @since 1.5
+         */
+        public static final UnicodeBlock SUPPLEMENTARY_PRIVATE_USE_AREA_B = new UnicodeBlock("SUPPLEMENTARY_PRIVATE_USE_AREA_B", 0x100000, 0x10ffff);
+        
+        /*
+         * All of the UnicodeBlocks with valid ranges in ascending order.
+         */
+        private static final UnicodeBlock[] BLOCKS = { BASIC_LATIN,
+                LATIN_1_SUPPLEMENT, LATIN_EXTENDED_A, LATIN_EXTENDED_B,
+                IPA_EXTENSIONS, SPACING_MODIFIER_LETTERS,
+                COMBINING_DIACRITICAL_MARKS, GREEK, CYRILLIC,
+                CYRILLIC_SUPPLEMENTARY, ARMENIAN, HEBREW, ARABIC, SYRIAC,
+                THAANA, DEVANAGARI, BENGALI, GURMUKHI, GUJARATI, ORIYA, TAMIL,
+                TELUGU, KANNADA, MALAYALAM, SINHALA, THAI, LAO, TIBETAN,
+                MYANMAR, GEORGIAN, HANGUL_JAMO, ETHIOPIC, CHEROKEE,
+                UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS, OGHAM, RUNIC, TAGALOG,
+                HANUNOO, BUHID, TAGBANWA, KHMER, MONGOLIAN, LIMBU, TAI_LE,
+                KHMER_SYMBOLS, PHONETIC_EXTENSIONS, LATIN_EXTENDED_ADDITIONAL,
+                GREEK_EXTENDED, GENERAL_PUNCTUATION,
+                SUPERSCRIPTS_AND_SUBSCRIPTS, CURRENCY_SYMBOLS,
+                COMBINING_MARKS_FOR_SYMBOLS, LETTERLIKE_SYMBOLS, NUMBER_FORMS,
+                ARROWS, MATHEMATICAL_OPERATORS, MISCELLANEOUS_TECHNICAL,
+                CONTROL_PICTURES, OPTICAL_CHARACTER_RECOGNITION,
+                ENCLOSED_ALPHANUMERICS, BOX_DRAWING, BLOCK_ELEMENTS,
+                GEOMETRIC_SHAPES, MISCELLANEOUS_SYMBOLS, DINGBATS,
+                MISCELLANEOUS_MATHEMATICAL_SYMBOLS_A, SUPPLEMENTAL_ARROWS_A,
+                BRAILLE_PATTERNS, SUPPLEMENTAL_ARROWS_B,
+                MISCELLANEOUS_MATHEMATICAL_SYMBOLS_B,
+                SUPPLEMENTAL_MATHEMATICAL_OPERATORS,
+                MISCELLANEOUS_SYMBOLS_AND_ARROWS, CJK_RADICALS_SUPPLEMENT,
+                KANGXI_RADICALS, IDEOGRAPHIC_DESCRIPTION_CHARACTERS,
+                CJK_SYMBOLS_AND_PUNCTUATION, HIRAGANA, KATAKANA, BOPOMOFO,
+                HANGUL_COMPATIBILITY_JAMO, KANBUN, BOPOMOFO_EXTENDED,
+                KATAKANA_PHONETIC_EXTENSIONS, ENCLOSED_CJK_LETTERS_AND_MONTHS,
+                CJK_COMPATIBILITY, CJK_UNIFIED_IDEOGRAPHS_EXTENSION_A,
+                YIJING_HEXAGRAM_SYMBOLS, CJK_UNIFIED_IDEOGRAPHS, YI_SYLLABLES,
+                YI_RADICALS, HANGUL_SYLLABLES, HIGH_SURROGATES,
+                HIGH_PRIVATE_USE_SURROGATES, LOW_SURROGATES, PRIVATE_USE_AREA,
+                CJK_COMPATIBILITY_IDEOGRAPHS, ALPHABETIC_PRESENTATION_FORMS,
+                ARABIC_PRESENTATION_FORMS_A, VARIATION_SELECTORS,
+                COMBINING_HALF_MARKS, CJK_COMPATIBILITY_FORMS,
+                SMALL_FORM_VARIANTS, ARABIC_PRESENTATION_FORMS_B,
+                HALFWIDTH_AND_FULLWIDTH_FORMS, SPECIALS, LINEAR_B_SYLLABARY,
+                LINEAR_B_IDEOGRAMS, AEGEAN_NUMBERS, OLD_ITALIC, GOTHIC,
+                UGARITIC, DESERET, SHAVIAN, OSMANYA, CYPRIOT_SYLLABARY,
+                BYZANTINE_MUSICAL_SYMBOLS, MUSICAL_SYMBOLS,
+                TAI_XUAN_JING_SYMBOLS, MATHEMATICAL_ALPHANUMERIC_SYMBOLS,
+                CJK_UNIFIED_IDEOGRAPHS_EXTENSION_B,
+                CJK_COMPATIBILITY_IDEOGRAPHS_SUPPLEMENT, TAGS,
+                VARIATION_SELECTORS_SUPPLEMENT,
+                SUPPLEMENTARY_PRIVATE_USE_AREA_A,
+                SUPPLEMENTARY_PRIVATE_USE_AREA_B };
+
+        /*
+         * A SortedMap (String.CASE_INSENSITIVE_ORDER) with keys that represents
+         * valid block names and values of the UnicodeBlock constant they map
+         * to.
+         */
+        //TODO Generify the field assignment when TreeMap is generified.
+        private static final SortedMap<String, UnicodeBlock> BLOCKS_BY_NAME = new TreeMap(String.CASE_INSENSITIVE_ORDER);
+        
+        static {
+            BLOCKS_BY_NAME.put("SURROGATES_AREA", SURROGATES_AREA);
+            BLOCKS_BY_NAME.put("Basic Latin", BASIC_LATIN);
+            BLOCKS_BY_NAME.put("BasicLatin", BASIC_LATIN);
+            BLOCKS_BY_NAME.put("BASIC_LATIN", BASIC_LATIN);
+            BLOCKS_BY_NAME.put("Latin-1 Supplement", LATIN_1_SUPPLEMENT);
+            BLOCKS_BY_NAME.put("Latin-1Supplement", LATIN_1_SUPPLEMENT);
+            BLOCKS_BY_NAME.put("LATIN_1_SUPPLEMENT", LATIN_1_SUPPLEMENT);
+            BLOCKS_BY_NAME.put("Latin Extended-A", LATIN_EXTENDED_A);
+            BLOCKS_BY_NAME.put("LatinExtended-A", LATIN_EXTENDED_A);
+            BLOCKS_BY_NAME.put("LATIN_EXTENDED_A", LATIN_EXTENDED_A);
+            BLOCKS_BY_NAME.put("Latin Extended-B", LATIN_EXTENDED_B);
+            BLOCKS_BY_NAME.put("LatinExtended-B", LATIN_EXTENDED_B);
+            BLOCKS_BY_NAME.put("LATIN_EXTENDED_B", LATIN_EXTENDED_B);
+            BLOCKS_BY_NAME.put("IPA Extensions", IPA_EXTENSIONS);
+            BLOCKS_BY_NAME.put("IPAExtensions", IPA_EXTENSIONS);
+            BLOCKS_BY_NAME.put("IPA_EXTENSIONS", IPA_EXTENSIONS);
+            BLOCKS_BY_NAME.put("Spacing Modifier Letters", SPACING_MODIFIER_LETTERS);
+            BLOCKS_BY_NAME.put("SpacingModifierLetters", SPACING_MODIFIER_LETTERS);
+            BLOCKS_BY_NAME.put("SPACING_MODIFIER_LETTERS", SPACING_MODIFIER_LETTERS);
+            BLOCKS_BY_NAME.put("Combining Diacritical Marks", COMBINING_DIACRITICAL_MARKS);
+            BLOCKS_BY_NAME.put("CombiningDiacriticalMarks", COMBINING_DIACRITICAL_MARKS);
+            BLOCKS_BY_NAME.put("COMBINING_DIACRITICAL_MARKS", COMBINING_DIACRITICAL_MARKS);
+            BLOCKS_BY_NAME.put("Greek and Coptic", GREEK);
+            BLOCKS_BY_NAME.put("GreekandCoptic", GREEK);
+            BLOCKS_BY_NAME.put("GREEK", GREEK);
+            BLOCKS_BY_NAME.put("Greek", GREEK);
+            BLOCKS_BY_NAME.put("Greek", GREEK);
+            BLOCKS_BY_NAME.put("Cyrillic", CYRILLIC);
+            BLOCKS_BY_NAME.put("Cyrillic Supplement", CYRILLIC_SUPPLEMENTARY);
+            BLOCKS_BY_NAME.put("CyrillicSupplement", CYRILLIC_SUPPLEMENTARY);
+            BLOCKS_BY_NAME.put("CYRILLIC_SUPPLEMENTARY", CYRILLIC_SUPPLEMENTARY);
+            BLOCKS_BY_NAME.put("Cyrillic Supplementary", CYRILLIC_SUPPLEMENTARY);
+            BLOCKS_BY_NAME.put("CyrillicSupplementary", CYRILLIC_SUPPLEMENTARY);
+            BLOCKS_BY_NAME.put("Armenian", ARMENIAN);
+            BLOCKS_BY_NAME.put("Hebrew", HEBREW);
+            BLOCKS_BY_NAME.put("Arabic", ARABIC);
+            BLOCKS_BY_NAME.put("Syriac", SYRIAC);
+            BLOCKS_BY_NAME.put("Thaana", THAANA);
+            BLOCKS_BY_NAME.put("Devanagari", DEVANAGARI);
+            BLOCKS_BY_NAME.put("Bengali", BENGALI);
+            BLOCKS_BY_NAME.put("Gurmukhi", GURMUKHI);
+            BLOCKS_BY_NAME.put("Gujarati", GUJARATI);
+            BLOCKS_BY_NAME.put("Oriya", ORIYA);
+            BLOCKS_BY_NAME.put("Tamil", TAMIL);
+            BLOCKS_BY_NAME.put("Telugu", TELUGU);
+            BLOCKS_BY_NAME.put("Kannada", KANNADA);
+            BLOCKS_BY_NAME.put("Malayalam", MALAYALAM);
+            BLOCKS_BY_NAME.put("Sinhala", SINHALA);
+            BLOCKS_BY_NAME.put("Thai", THAI);
+            BLOCKS_BY_NAME.put("Lao", LAO);
+            BLOCKS_BY_NAME.put("Tibetan", TIBETAN);
+            BLOCKS_BY_NAME.put("Myanmar", MYANMAR);
+            BLOCKS_BY_NAME.put("Georgian", GEORGIAN);
+            BLOCKS_BY_NAME.put("Hangul Jamo", HANGUL_JAMO);
+            BLOCKS_BY_NAME.put("HangulJamo", HANGUL_JAMO);
+            BLOCKS_BY_NAME.put("HANGUL_JAMO", HANGUL_JAMO);
+            BLOCKS_BY_NAME.put("Ethiopic", ETHIOPIC);
+            BLOCKS_BY_NAME.put("Cherokee", CHEROKEE);
+            BLOCKS_BY_NAME.put("Unified Canadian Aboriginal Syllabics", UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS);
+            BLOCKS_BY_NAME.put("UnifiedCanadianAboriginalSyllabics", UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS);
+            BLOCKS_BY_NAME.put("UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS", UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS);
+            BLOCKS_BY_NAME.put("Ogham", OGHAM);
+            BLOCKS_BY_NAME.put("Runic", RUNIC);
+            BLOCKS_BY_NAME.put("Tagalog", TAGALOG);
+            BLOCKS_BY_NAME.put("Hanunoo", HANUNOO);
+            BLOCKS_BY_NAME.put("Buhid", BUHID);
+            BLOCKS_BY_NAME.put("Tagbanwa", TAGBANWA);
+            BLOCKS_BY_NAME.put("Khmer", KHMER);
+            BLOCKS_BY_NAME.put("Mongolian", MONGOLIAN);
+            BLOCKS_BY_NAME.put("Limbu", LIMBU);
+            BLOCKS_BY_NAME.put("Tai Le", TAI_LE);
+            BLOCKS_BY_NAME.put("TaiLe", TAI_LE);
+            BLOCKS_BY_NAME.put("TAI_LE", TAI_LE);
+            BLOCKS_BY_NAME.put("Khmer Symbols", KHMER_SYMBOLS);
+            BLOCKS_BY_NAME.put("KhmerSymbols", KHMER_SYMBOLS);
+            BLOCKS_BY_NAME.put("KHMER_SYMBOLS", KHMER_SYMBOLS);
+            BLOCKS_BY_NAME.put("Phonetic Extensions", PHONETIC_EXTENSIONS);
+            BLOCKS_BY_NAME.put("PhoneticExtensions", PHONETIC_EXTENSIONS);
+            BLOCKS_BY_NAME.put("PHONETIC_EXTENSIONS", PHONETIC_EXTENSIONS);
+            BLOCKS_BY_NAME.put("Latin Extended Additional", LATIN_EXTENDED_ADDITIONAL);
+            BLOCKS_BY_NAME.put("LatinExtendedAdditional", LATIN_EXTENDED_ADDITIONAL);
+            BLOCKS_BY_NAME.put("LATIN_EXTENDED_ADDITIONAL", LATIN_EXTENDED_ADDITIONAL);
+            BLOCKS_BY_NAME.put("Greek Extended", GREEK_EXTENDED);
+            BLOCKS_BY_NAME.put("GreekExtended", GREEK_EXTENDED);
+            BLOCKS_BY_NAME.put("GREEK_EXTENDED", GREEK_EXTENDED);
+            BLOCKS_BY_NAME.put("General Punctuation", GENERAL_PUNCTUATION);
+            BLOCKS_BY_NAME.put("GeneralPunctuation", GENERAL_PUNCTUATION);
+            BLOCKS_BY_NAME.put("GENERAL_PUNCTUATION", GENERAL_PUNCTUATION);
+            BLOCKS_BY_NAME.put("Superscripts and Subscripts", SUPERSCRIPTS_AND_SUBSCRIPTS);
+            BLOCKS_BY_NAME.put("SuperscriptsandSubscripts", SUPERSCRIPTS_AND_SUBSCRIPTS);
+            BLOCKS_BY_NAME.put("SUPERSCRIPTS_AND_SUBSCRIPTS", SUPERSCRIPTS_AND_SUBSCRIPTS);
+            BLOCKS_BY_NAME.put("Currency Symbols", CURRENCY_SYMBOLS);
+            BLOCKS_BY_NAME.put("CurrencySymbols", CURRENCY_SYMBOLS);
+            BLOCKS_BY_NAME.put("CURRENCY_SYMBOLS", CURRENCY_SYMBOLS);
+            BLOCKS_BY_NAME.put("Combining Diacritical Marks for Symbols", COMBINING_MARKS_FOR_SYMBOLS);
+            BLOCKS_BY_NAME.put("CombiningDiacriticalMarksforSymbols", COMBINING_MARKS_FOR_SYMBOLS);
+            BLOCKS_BY_NAME.put("COMBINING_MARKS_FOR_SYMBOLS", COMBINING_MARKS_FOR_SYMBOLS);
+            BLOCKS_BY_NAME.put("Combining Marks for Symbols", COMBINING_MARKS_FOR_SYMBOLS);
+            BLOCKS_BY_NAME.put("CombiningMarksforSymbols", COMBINING_MARKS_FOR_SYMBOLS);
+            BLOCKS_BY_NAME.put("Letterlike Symbols", LETTERLIKE_SYMBOLS);
+            BLOCKS_BY_NAME.put("LetterlikeSymbols", LETTERLIKE_SYMBOLS);
+            BLOCKS_BY_NAME.put("LETTERLIKE_SYMBOLS", LETTERLIKE_SYMBOLS);
+            BLOCKS_BY_NAME.put("Number Forms", NUMBER_FORMS);
+            BLOCKS_BY_NAME.put("NumberForms", NUMBER_FORMS);
+            BLOCKS_BY_NAME.put("NUMBER_FORMS", NUMBER_FORMS);
+            BLOCKS_BY_NAME.put("Arrows", ARROWS);
+            BLOCKS_BY_NAME.put("Mathematical Operators", MATHEMATICAL_OPERATORS);
+            BLOCKS_BY_NAME.put("MathematicalOperators", MATHEMATICAL_OPERATORS);
+            BLOCKS_BY_NAME.put("MATHEMATICAL_OPERATORS", MATHEMATICAL_OPERATORS);
+            BLOCKS_BY_NAME.put("Miscellaneous Technical", MISCELLANEOUS_TECHNICAL);
+            BLOCKS_BY_NAME.put("MiscellaneousTechnical", MISCELLANEOUS_TECHNICAL);
+            BLOCKS_BY_NAME.put("MISCELLANEOUS_TECHNICAL", MISCELLANEOUS_TECHNICAL);
+            BLOCKS_BY_NAME.put("Control Pictures", CONTROL_PICTURES);
+            BLOCKS_BY_NAME.put("ControlPictures", CONTROL_PICTURES);
+            BLOCKS_BY_NAME.put("CONTROL_PICTURES", CONTROL_PICTURES);
+            BLOCKS_BY_NAME.put("Optical Character Recognition", OPTICAL_CHARACTER_RECOGNITION);
+            BLOCKS_BY_NAME.put("OpticalCharacterRecognition", OPTICAL_CHARACTER_RECOGNITION);
+            BLOCKS_BY_NAME.put("OPTICAL_CHARACTER_RECOGNITION", OPTICAL_CHARACTER_RECOGNITION);
+            BLOCKS_BY_NAME.put("Enclosed Alphanumerics", ENCLOSED_ALPHANUMERICS);
+            BLOCKS_BY_NAME.put("EnclosedAlphanumerics", ENCLOSED_ALPHANUMERICS);
+            BLOCKS_BY_NAME.put("ENCLOSED_ALPHANUMERICS", ENCLOSED_ALPHANUMERICS);
+            BLOCKS_BY_NAME.put("Box Drawing", BOX_DRAWING);
+            BLOCKS_BY_NAME.put("BoxDrawing", BOX_DRAWING);
+            BLOCKS_BY_NAME.put("BOX_DRAWING", BOX_DRAWING);
+            BLOCKS_BY_NAME.put("Block Elements", BLOCK_ELEMENTS);
+            BLOCKS_BY_NAME.put("BlockElements", BLOCK_ELEMENTS);
+            BLOCKS_BY_NAME.put("BLOCK_ELEMENTS", BLOCK_ELEMENTS);
+            BLOCKS_BY_NAME.put("Geometric Shapes", GEOMETRIC_SHAPES);
+            BLOCKS_BY_NAME.put("GeometricShapes", GEOMETRIC_SHAPES);
+            BLOCKS_BY_NAME.put("GEOMETRIC_SHAPES", GEOMETRIC_SHAPES);
+            BLOCKS_BY_NAME.put("Miscellaneous Symbols", MISCELLANEOUS_SYMBOLS);
+            BLOCKS_BY_NAME.put("MiscellaneousSymbols", MISCELLANEOUS_SYMBOLS);
+            BLOCKS_BY_NAME.put("MISCELLANEOUS_SYMBOLS", MISCELLANEOUS_SYMBOLS);
+            BLOCKS_BY_NAME.put("Dingbats", DINGBATS);
+            BLOCKS_BY_NAME.put("Miscellaneous Mathematical Symbols-A", MISCELLANEOUS_MATHEMATICAL_SYMBOLS_A);
+            BLOCKS_BY_NAME.put("MiscellaneousMathematicalSymbols-A", MISCELLANEOUS_MATHEMATICAL_SYMBOLS_A);
+            BLOCKS_BY_NAME.put("MISCELLANEOUS_MATHEMATICAL_SYMBOLS_A", MISCELLANEOUS_MATHEMATICAL_SYMBOLS_A);
+            BLOCKS_BY_NAME.put("Supplemental Arrows-A", SUPPLEMENTAL_ARROWS_A);
+            BLOCKS_BY_NAME.put("SupplementalArrows-A", SUPPLEMENTAL_ARROWS_A);
+            BLOCKS_BY_NAME.put("SUPPLEMENTAL_ARROWS_A", SUPPLEMENTAL_ARROWS_A);
+            BLOCKS_BY_NAME.put("Braille Patterns", BRAILLE_PATTERNS);
+            BLOCKS_BY_NAME.put("BraillePatterns", BRAILLE_PATTERNS);
+            BLOCKS_BY_NAME.put("BRAILLE_PATTERNS", BRAILLE_PATTERNS);
+            BLOCKS_BY_NAME.put("Supplemental Arrows-B", SUPPLEMENTAL_ARROWS_B);
+            BLOCKS_BY_NAME.put("SupplementalArrows-B", SUPPLEMENTAL_ARROWS_B);
+            BLOCKS_BY_NAME.put("SUPPLEMENTAL_ARROWS_B", SUPPLEMENTAL_ARROWS_B);
+            BLOCKS_BY_NAME.put("Miscellaneous Mathematical Symbols-B", MISCELLANEOUS_MATHEMATICAL_SYMBOLS_B);
+            BLOCKS_BY_NAME.put("MiscellaneousMathematicalSymbols-B", MISCELLANEOUS_MATHEMATICAL_SYMBOLS_B);
+            BLOCKS_BY_NAME.put("MISCELLANEOUS_MATHEMATICAL_SYMBOLS_B", MISCELLANEOUS_MATHEMATICAL_SYMBOLS_B);
+            BLOCKS_BY_NAME.put("Supplemental Mathematical Operators", SUPPLEMENTAL_MATHEMATICAL_OPERATORS);
+            BLOCKS_BY_NAME.put("SupplementalMathematicalOperators", SUPPLEMENTAL_MATHEMATICAL_OPERATORS);
+            BLOCKS_BY_NAME.put("SUPPLEMENTAL_MATHEMATICAL_OPERATORS", SUPPLEMENTAL_MATHEMATICAL_OPERATORS);
+            BLOCKS_BY_NAME.put("Miscellaneous Symbols and Arrows", MISCELLANEOUS_SYMBOLS_AND_ARROWS);
+            BLOCKS_BY_NAME.put("MiscellaneousSymbolsandArrows", MISCELLANEOUS_SYMBOLS_AND_ARROWS);
+            BLOCKS_BY_NAME.put("MISCELLANEOUS_SYMBOLS_AND_ARROWS", MISCELLANEOUS_SYMBOLS_AND_ARROWS);
+            BLOCKS_BY_NAME.put("CJK Radicals Supplement", CJK_RADICALS_SUPPLEMENT);
+            BLOCKS_BY_NAME.put("CJKRadicalsSupplement", CJK_RADICALS_SUPPLEMENT);
+            BLOCKS_BY_NAME.put("CJK_RADICALS_SUPPLEMENT", CJK_RADICALS_SUPPLEMENT);
+            BLOCKS_BY_NAME.put("Kangxi Radicals", KANGXI_RADICALS);
+            BLOCKS_BY_NAME.put("KangxiRadicals", KANGXI_RADICALS);
+            BLOCKS_BY_NAME.put("KANGXI_RADICALS", KANGXI_RADICALS);
+            BLOCKS_BY_NAME.put("Ideographic Description Characters", IDEOGRAPHIC_DESCRIPTION_CHARACTERS);
+            BLOCKS_BY_NAME.put("IdeographicDescriptionCharacters", IDEOGRAPHIC_DESCRIPTION_CHARACTERS);
+            BLOCKS_BY_NAME.put("IDEOGRAPHIC_DESCRIPTION_CHARACTERS", IDEOGRAPHIC_DESCRIPTION_CHARACTERS);
+            BLOCKS_BY_NAME.put("CJK Symbols and Punctuation", CJK_SYMBOLS_AND_PUNCTUATION);
+            BLOCKS_BY_NAME.put("CJKSymbolsandPunctuation", CJK_SYMBOLS_AND_PUNCTUATION);
+            BLOCKS_BY_NAME.put("CJK_SYMBOLS_AND_PUNCTUATION", CJK_SYMBOLS_AND_PUNCTUATION);
+            BLOCKS_BY_NAME.put("Hiragana", HIRAGANA);
+            BLOCKS_BY_NAME.put("Katakana", KATAKANA);
+            BLOCKS_BY_NAME.put("Bopomofo", BOPOMOFO);
+            BLOCKS_BY_NAME.put("Hangul Compatibility Jamo", HANGUL_COMPATIBILITY_JAMO);
+            BLOCKS_BY_NAME.put("HangulCompatibilityJamo", HANGUL_COMPATIBILITY_JAMO);
+            BLOCKS_BY_NAME.put("HANGUL_COMPATIBILITY_JAMO", HANGUL_COMPATIBILITY_JAMO);
+            BLOCKS_BY_NAME.put("Kanbun", KANBUN);
+            BLOCKS_BY_NAME.put("Bopomofo Extended", BOPOMOFO_EXTENDED);
+            BLOCKS_BY_NAME.put("BopomofoExtended", BOPOMOFO_EXTENDED);
+            BLOCKS_BY_NAME.put("BOPOMOFO_EXTENDED", BOPOMOFO_EXTENDED);
+            BLOCKS_BY_NAME.put("Katakana Phonetic Extensions", KATAKANA_PHONETIC_EXTENSIONS);
+            BLOCKS_BY_NAME.put("KatakanaPhoneticExtensions", KATAKANA_PHONETIC_EXTENSIONS);
+            BLOCKS_BY_NAME.put("KATAKANA_PHONETIC_EXTENSIONS", KATAKANA_PHONETIC_EXTENSIONS);
+            BLOCKS_BY_NAME.put("Enclosed CJK Letters and Months", ENCLOSED_CJK_LETTERS_AND_MONTHS);
+            BLOCKS_BY_NAME.put("EnclosedCJKLettersandMonths", ENCLOSED_CJK_LETTERS_AND_MONTHS);
+            BLOCKS_BY_NAME.put("ENCLOSED_CJK_LETTERS_AND_MONTHS", ENCLOSED_CJK_LETTERS_AND_MONTHS);
+            BLOCKS_BY_NAME.put("CJK Compatibility", CJK_COMPATIBILITY);
+            BLOCKS_BY_NAME.put("CJKCompatibility", CJK_COMPATIBILITY);
+            BLOCKS_BY_NAME.put("CJK_COMPATIBILITY", CJK_COMPATIBILITY);
+            BLOCKS_BY_NAME.put("CJK Unified Ideographs Extension A", CJK_UNIFIED_IDEOGRAPHS_EXTENSION_A);
+            BLOCKS_BY_NAME.put("CJKUnifiedIdeographsExtensionA", CJK_UNIFIED_IDEOGRAPHS_EXTENSION_A);
+            BLOCKS_BY_NAME.put("CJK_UNIFIED_IDEOGRAPHS_EXTENSION_A", CJK_UNIFIED_IDEOGRAPHS_EXTENSION_A);
+            BLOCKS_BY_NAME.put("Yijing Hexagram Symbols", YIJING_HEXAGRAM_SYMBOLS);
+            BLOCKS_BY_NAME.put("YijingHexagramSymbols", YIJING_HEXAGRAM_SYMBOLS);
+            BLOCKS_BY_NAME.put("YIJING_HEXAGRAM_SYMBOLS", YIJING_HEXAGRAM_SYMBOLS);
+            BLOCKS_BY_NAME.put("CJK Unified Ideographs", CJK_UNIFIED_IDEOGRAPHS);
+            BLOCKS_BY_NAME.put("CJKUnifiedIdeographs", CJK_UNIFIED_IDEOGRAPHS);
+            BLOCKS_BY_NAME.put("CJK_UNIFIED_IDEOGRAPHS", CJK_UNIFIED_IDEOGRAPHS);
+            BLOCKS_BY_NAME.put("Yi Syllables", YI_SYLLABLES);
+            BLOCKS_BY_NAME.put("YiSyllables", YI_SYLLABLES);
+            BLOCKS_BY_NAME.put("YI_SYLLABLES", YI_SYLLABLES);
+            BLOCKS_BY_NAME.put("Yi Radicals", YI_RADICALS);
+            BLOCKS_BY_NAME.put("YiRadicals", YI_RADICALS);
+            BLOCKS_BY_NAME.put("YI_RADICALS", YI_RADICALS);
+            BLOCKS_BY_NAME.put("Hangul Syllables", HANGUL_SYLLABLES);
+            BLOCKS_BY_NAME.put("HangulSyllables", HANGUL_SYLLABLES);
+            BLOCKS_BY_NAME.put("HANGUL_SYLLABLES", HANGUL_SYLLABLES);
+            BLOCKS_BY_NAME.put("High Surrogates", HIGH_SURROGATES);
+            BLOCKS_BY_NAME.put("HighSurrogates", HIGH_SURROGATES);
+            BLOCKS_BY_NAME.put("HIGH_SURROGATES", HIGH_SURROGATES);
+            BLOCKS_BY_NAME.put("High Private Use Surrogates", HIGH_PRIVATE_USE_SURROGATES);
+            BLOCKS_BY_NAME.put("HighPrivateUseSurrogates", HIGH_PRIVATE_USE_SURROGATES);
+            BLOCKS_BY_NAME.put("HIGH_PRIVATE_USE_SURROGATES", HIGH_PRIVATE_USE_SURROGATES);
+            BLOCKS_BY_NAME.put("Low Surrogates", LOW_SURROGATES);
+            BLOCKS_BY_NAME.put("LowSurrogates", LOW_SURROGATES);
+            BLOCKS_BY_NAME.put("LOW_SURROGATES", LOW_SURROGATES);
+            BLOCKS_BY_NAME.put("Private Use Area", PRIVATE_USE_AREA);
+            BLOCKS_BY_NAME.put("PrivateUseArea", PRIVATE_USE_AREA);
+            BLOCKS_BY_NAME.put("PRIVATE_USE_AREA", PRIVATE_USE_AREA);
+            BLOCKS_BY_NAME.put("CJK Compatibility Ideographs", CJK_COMPATIBILITY_IDEOGRAPHS);
+            BLOCKS_BY_NAME.put("CJKCompatibilityIdeographs", CJK_COMPATIBILITY_IDEOGRAPHS);
+            BLOCKS_BY_NAME.put("CJK_COMPATIBILITY_IDEOGRAPHS", CJK_COMPATIBILITY_IDEOGRAPHS);
+            BLOCKS_BY_NAME.put("Alphabetic Presentation Forms", ALPHABETIC_PRESENTATION_FORMS);
+            BLOCKS_BY_NAME.put("AlphabeticPresentationForms", ALPHABETIC_PRESENTATION_FORMS);
+            BLOCKS_BY_NAME.put("ALPHABETIC_PRESENTATION_FORMS", ALPHABETIC_PRESENTATION_FORMS);
+            BLOCKS_BY_NAME.put("Arabic Presentation Forms-A", ARABIC_PRESENTATION_FORMS_A);
+            BLOCKS_BY_NAME.put("ArabicPresentationForms-A", ARABIC_PRESENTATION_FORMS_A);
+            BLOCKS_BY_NAME.put("ARABIC_PRESENTATION_FORMS_A", ARABIC_PRESENTATION_FORMS_A);
+            BLOCKS_BY_NAME.put("Variation Selectors", VARIATION_SELECTORS);
+            BLOCKS_BY_NAME.put("VariationSelectors", VARIATION_SELECTORS);
+            BLOCKS_BY_NAME.put("VARIATION_SELECTORS", VARIATION_SELECTORS);
+            BLOCKS_BY_NAME.put("Combining Half Marks", COMBINING_HALF_MARKS);
+            BLOCKS_BY_NAME.put("CombiningHalfMarks", COMBINING_HALF_MARKS);
+            BLOCKS_BY_NAME.put("COMBINING_HALF_MARKS", COMBINING_HALF_MARKS);
+            BLOCKS_BY_NAME.put("CJK Compatibility Forms", CJK_COMPATIBILITY_FORMS);
+            BLOCKS_BY_NAME.put("CJKCompatibilityForms", CJK_COMPATIBILITY_FORMS);
+            BLOCKS_BY_NAME.put("CJK_COMPATIBILITY_FORMS", CJK_COMPATIBILITY_FORMS);
+            BLOCKS_BY_NAME.put("Small Form Variants", SMALL_FORM_VARIANTS);
+            BLOCKS_BY_NAME.put("SmallFormVariants", SMALL_FORM_VARIANTS);
+            BLOCKS_BY_NAME.put("SMALL_FORM_VARIANTS", SMALL_FORM_VARIANTS);
+            BLOCKS_BY_NAME.put("Arabic Presentation Forms-B", ARABIC_PRESENTATION_FORMS_B);
+            BLOCKS_BY_NAME.put("ArabicPresentationForms-B", ARABIC_PRESENTATION_FORMS_B);
+            BLOCKS_BY_NAME.put("ARABIC_PRESENTATION_FORMS_B", ARABIC_PRESENTATION_FORMS_B);
+            BLOCKS_BY_NAME.put("Halfwidth and Fullwidth Forms", HALFWIDTH_AND_FULLWIDTH_FORMS);
+            BLOCKS_BY_NAME.put("HalfwidthandFullwidthForms", HALFWIDTH_AND_FULLWIDTH_FORMS);
+            BLOCKS_BY_NAME.put("HALFWIDTH_AND_FULLWIDTH_FORMS", HALFWIDTH_AND_FULLWIDTH_FORMS);
+            BLOCKS_BY_NAME.put("Specials", SPECIALS);
+            BLOCKS_BY_NAME.put("Linear B Syllabary", LINEAR_B_SYLLABARY);
+            BLOCKS_BY_NAME.put("LinearBSyllabary", LINEAR_B_SYLLABARY);
+            BLOCKS_BY_NAME.put("LINEAR_B_SYLLABARY", LINEAR_B_SYLLABARY);
+            BLOCKS_BY_NAME.put("Linear B Ideograms", LINEAR_B_IDEOGRAMS);
+            BLOCKS_BY_NAME.put("LinearBIdeograms", LINEAR_B_IDEOGRAMS);
+            BLOCKS_BY_NAME.put("LINEAR_B_IDEOGRAMS", LINEAR_B_IDEOGRAMS);
+            BLOCKS_BY_NAME.put("Aegean Numbers", AEGEAN_NUMBERS);
+            BLOCKS_BY_NAME.put("AegeanNumbers", AEGEAN_NUMBERS);
+            BLOCKS_BY_NAME.put("AEGEAN_NUMBERS", AEGEAN_NUMBERS);
+            BLOCKS_BY_NAME.put("Old Italic", OLD_ITALIC);
+            BLOCKS_BY_NAME.put("OldItalic", OLD_ITALIC);
+            BLOCKS_BY_NAME.put("OLD_ITALIC", OLD_ITALIC);
+            BLOCKS_BY_NAME.put("Gothic", GOTHIC);
+            BLOCKS_BY_NAME.put("Ugaritic", UGARITIC);
+            BLOCKS_BY_NAME.put("Deseret", DESERET);
+            BLOCKS_BY_NAME.put("Shavian", SHAVIAN);
+            BLOCKS_BY_NAME.put("Osmanya", OSMANYA);
+            BLOCKS_BY_NAME.put("Cypriot Syllabary", CYPRIOT_SYLLABARY);
+            BLOCKS_BY_NAME.put("CypriotSyllabary", CYPRIOT_SYLLABARY);
+            BLOCKS_BY_NAME.put("CYPRIOT_SYLLABARY", CYPRIOT_SYLLABARY);
+            BLOCKS_BY_NAME.put("Byzantine Musical Symbols", BYZANTINE_MUSICAL_SYMBOLS);
+            BLOCKS_BY_NAME.put("ByzantineMusicalSymbols", BYZANTINE_MUSICAL_SYMBOLS);
+            BLOCKS_BY_NAME.put("BYZANTINE_MUSICAL_SYMBOLS", BYZANTINE_MUSICAL_SYMBOLS);
+            BLOCKS_BY_NAME.put("Musical Symbols", MUSICAL_SYMBOLS);
+            BLOCKS_BY_NAME.put("MusicalSymbols", MUSICAL_SYMBOLS);
+            BLOCKS_BY_NAME.put("MUSICAL_SYMBOLS", MUSICAL_SYMBOLS);
+            BLOCKS_BY_NAME.put("Tai Xuan Jing Symbols", TAI_XUAN_JING_SYMBOLS);
+            BLOCKS_BY_NAME.put("TaiXuanJingSymbols", TAI_XUAN_JING_SYMBOLS);
+            BLOCKS_BY_NAME.put("TAI_XUAN_JING_SYMBOLS", TAI_XUAN_JING_SYMBOLS);
+            BLOCKS_BY_NAME.put("Mathematical Alphanumeric Symbols", MATHEMATICAL_ALPHANUMERIC_SYMBOLS);
+            BLOCKS_BY_NAME.put("MathematicalAlphanumericSymbols", MATHEMATICAL_ALPHANUMERIC_SYMBOLS);
+            BLOCKS_BY_NAME.put("MATHEMATICAL_ALPHANUMERIC_SYMBOLS", MATHEMATICAL_ALPHANUMERIC_SYMBOLS);
+            BLOCKS_BY_NAME.put("CJK Unified Ideographs Extension B", CJK_UNIFIED_IDEOGRAPHS_EXTENSION_B);
+            BLOCKS_BY_NAME.put("CJKUnifiedIdeographsExtensionB", CJK_UNIFIED_IDEOGRAPHS_EXTENSION_B);
+            BLOCKS_BY_NAME.put("CJK_UNIFIED_IDEOGRAPHS_EXTENSION_B", CJK_UNIFIED_IDEOGRAPHS_EXTENSION_B);
+            BLOCKS_BY_NAME.put("CJK Compatibility Ideographs Supplement", CJK_COMPATIBILITY_IDEOGRAPHS_SUPPLEMENT);
+            BLOCKS_BY_NAME.put("CJKCompatibilityIdeographsSupplement", CJK_COMPATIBILITY_IDEOGRAPHS_SUPPLEMENT);
+            BLOCKS_BY_NAME.put("CJK_COMPATIBILITY_IDEOGRAPHS_SUPPLEMENT", CJK_COMPATIBILITY_IDEOGRAPHS_SUPPLEMENT);
+            BLOCKS_BY_NAME.put("Tags", TAGS);
+            BLOCKS_BY_NAME.put("Variation Selectors Supplement", VARIATION_SELECTORS_SUPPLEMENT);
+            BLOCKS_BY_NAME.put("VariationSelectorsSupplement", VARIATION_SELECTORS_SUPPLEMENT);
+            BLOCKS_BY_NAME.put("VARIATION_SELECTORS_SUPPLEMENT", VARIATION_SELECTORS_SUPPLEMENT);
+            BLOCKS_BY_NAME.put("Supplementary Private Use Area-A", SUPPLEMENTARY_PRIVATE_USE_AREA_A);
+            BLOCKS_BY_NAME.put("SupplementaryPrivateUseArea-A", SUPPLEMENTARY_PRIVATE_USE_AREA_A);
+            BLOCKS_BY_NAME.put("SUPPLEMENTARY_PRIVATE_USE_AREA_A", SUPPLEMENTARY_PRIVATE_USE_AREA_A);
+            BLOCKS_BY_NAME.put("Supplementary Private Use Area-B", SUPPLEMENTARY_PRIVATE_USE_AREA_B);
+            BLOCKS_BY_NAME.put("SupplementaryPrivateUseArea-B", SUPPLEMENTARY_PRIVATE_USE_AREA_B);
+            BLOCKS_BY_NAME.put("SUPPLEMENTARY_PRIVATE_USE_AREA_B", SUPPLEMENTARY_PRIVATE_USE_AREA_B);
+        }
+        
+        /**
+         * <p>
+         * Retrieves the constant that corresponds to the block name given. The
+         * block names are defined by the Unicode 4.0.1 specification in the
+         * <code>Blocks-4.0.1.txt</code> file.
+         * </p>
+         * <p>
+         * Block names may be one of the following:
+         * </p>
+         * <ul>
+         * <li>Canonical block name, as defined by the Unicode specification;
+         * case-insensitive.</li>
+         * <li>Canonical block name without any spaces, as defined by the
+         * Unicode specification; case-insensitive.</li>
+         * <li><code>UnicodeBlock</code> constant identifier. This is
+         * determined by uppercasing the canonical name and replacing all spaces
+         * and hyphens with underscores.</li>
+         * </ul>
+         * 
+         * @param blockName The name of the block to retrieve.
+         * @return A UnicodeBlock constant.
+         * @throws NullPointerException if <code>blockName</code> is
+         *         <code>null</code>.
+         * @throws IllegalArgumentException if <code>blockName</code> is not a
+         *         valid block name.
+         * @since 1.5
+         */
+        public static UnicodeBlock forName(String blockName) {
+            if (blockName == null)
+                throw new NullPointerException();
+            UnicodeBlock match = BLOCKS_BY_NAME.get(blockName);
+            if (match == null)
+                throw new IllegalArgumentException();
+            return match;
+        }
+        
+        /**
+         * <p>
+         * Retrieves the constant that contains the given <code>char</code> or
+         * <code>null</code> if there is none.
+         * </p>
+         * 
+         * @param c The character to retrieve a UnicodeBlock for.
+         * @return A UnicodeBlock constant or <code>null</code>.
+         */
+        public static UnicodeBlock of(char c) {
+            return of((int) c);
+        }
+        
+        /**
+         * <p>
+         * Retrieves the constant that contains the given Unicode code point or
+         * <code>null</code> if there is none.
+         * </p>
+         * 
+         * @param codePoint The Unicode code point to retrieve a UnicodeBlock
+         *        for.
+         * @return A UnicodeBlock constant or <code>null</code>.
+         * @throws IllegalArgumentException if <code>codePoint</code> is not a
+         *         valid Unicode code point.
+         * @since 1.5
+         */
+        public static UnicodeBlock of(int codePoint) {
+            if (!isValidCodePoint(codePoint))
+                throw new IllegalArgumentException();
+            int low = 0;
+            int mid = -1;
+            int high = BLOCKS.length - 1;
+            while (low <= high) {
+                mid = (low + high) >> 1;
+                UnicodeBlock block = BLOCKS[mid];
+                if (codePoint > block.end) {
+                    low = mid + 1;
+                } else if (codePoint >= block.start && codePoint <= block.end) {
+                    return block;
+                } else {
+                    high = mid - 1;
+                }
+            }
+            return null;
+        }
+        
+        private int start;
+        private int end;
+        private UnicodeBlock(String name, int start, int end) {
+            super(name);
+            this.start = start;
+            this.end = end;
+        }
+    }
 
 	/**
 	 * Constructs a new instance of the receiver which represents the char



Mime
View raw message