diff --git a/tools/unicodetools/com/ibm/text/UCD/IntMap.java b/tools/unicodetools/com/ibm/text/UCD/IntMap.java new file mode 100644 index 00000000000..1686174cdc1 --- /dev/null +++ b/tools/unicodetools/com/ibm/text/UCD/IntMap.java @@ -0,0 +1,37 @@ +/** +******************************************************************************* +* Copyright (C) 1996-2001, International Business Machines Corporation and * +* others. All Rights Reserved. * +******************************************************************************* +* +* $Source: /xsrl/Nsvn/icu/unicodetools/com/ibm/text/UCD/IntMap.java,v $ +* $Date: 2003/03/18 00:10:47 $ +* $Revision: 1.1 $ +* +******************************************************************************* +*/ + +package com.ibm.text.UCD; +import java.util.HashMap; + +public class IntMap { + int lowest = Integer.MAX_VALUE; + int highest = Integer.MIN_VALUE; + HashMap store = new HashMap(); + + public Object get(int key) { + if (key < lowest || key > highest) return null; + return store.get(new Integer(key)); + } + + public void put(int key, Object value) { + if (key < lowest) lowest = key; + if (key > highest) highest = key; + store.put(new Integer(key), value); + } + + public int size() { + return store.size(); + } +} + \ No newline at end of file