Class UnicodeMap

  extended by ch.claudio.lib.UnicodeMap

public final class UnicodeMap
extends java.lang.Object

Maps an unicode block to the range of codepoints covered. Beware: This class executes Character.UnicodeBlock.of() on all possible codepoints between Character.MIN_CODE_POINT and Character.MAX_CODE_POINT, and on a weak CPU can take some time to initialize. On 2.4GHz Pentium 4-M with Sun JDK 1.5.0_06 this consumes about 0.2 seconds. It assumes, that every UnicodeBlock is assigned to a continuous range of characters. An assertion is triggered if a block would contain characters of two separate code blocks.

TODO: Given the assumption, a more intelligent algorithm could be devised with reduced execution time.

$Id: 178 2007-04-06 21:16:05Z claudio $
Claudio Nieder

Copyright (C) 2006-2007 Claudio Nieder <>, CH-8610 Uster

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.

This program 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 for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

Constructor Summary
Method Summary
static IntegerRange get(java.lang.Character.UnicodeBlock b)
          Return the character code range for an unicode block
static void main(java.lang.String[] args)
          Print license.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public UnicodeMap()
Method Detail


public static IntegerRange get(java.lang.Character.UnicodeBlock b)
Return the character code range for an unicode block

b - unicode block


public static void main(java.lang.String[] args)
Print license.

args - ignored