Fixes for VW
X-SVN-Rev: 11346
This commit is contained in:
parent
a351cedecf
commit
f4ae03b15c
37
tools/unicodetools/com/ibm/text/UCD/IntMap.java
Normal file
37
tools/unicodetools/com/ibm/text/UCD/IntMap.java
Normal file
@ -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();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user