public class ObjToIntMap extends Object implements Serializable
Modifier and Type | Class and Description |
---|---|
static class |
ObjToIntMap.Iterator |
Modifier and Type | Field and Description |
---|---|
static Object |
NULL_VALUE |
Constructor and Description |
---|
ObjToIntMap() |
ObjToIntMap(int keyCountHint) |
Modifier and Type | Method and Description |
---|---|
void |
clear() |
int |
get(Object key,
int defaultValue)
Get integer value assigned with key.
|
int |
getExisting(Object key)
Get integer value assigned with key.
|
Object[] |
getKeys()
Return array of present keys
|
void |
getKeys(Object[] array,
int offset) |
boolean |
has(Object key) |
Object |
intern(Object keyArg)
If table already contains a key that equals to keyArg, return that key
while setting its value to zero, otherwise add keyArg with 0 value to
the table and return it.
|
boolean |
isEmpty() |
ObjToIntMap.Iterator |
newIterator() |
void |
put(Object key,
int value) |
void |
remove(Object key) |
int |
size() |
public static final Object NULL_VALUE
public ObjToIntMap()
public ObjToIntMap(int keyCountHint)
public boolean isEmpty()
public int size()
public boolean has(Object key)
public int get(Object key, int defaultValue)
public int getExisting(Object key)
RuntimeException
- if key does not existpublic void put(Object key, int value)
public Object intern(Object keyArg)
public void remove(Object key)
public void clear()
public ObjToIntMap.Iterator newIterator()
public Object[] getKeys()
public void getKeys(Object[] array, int offset)
Copyright © 2018. All rights reserved.