|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.javascript.rhino.UintMap
public class UintMap
Map to associate non-negative integers to objects or integers. The map does not synchronize any of its operation, so either use it from a single thread or do own synchronization or perform all mutation operations on one thread before passing the map to others.
Constructor Summary | |
---|---|
UintMap()
|
|
UintMap(int initialCapacity)
|
Method Summary | |
---|---|
void |
clear()
|
int |
getExistingInt(int key)
Get integer value assigned with key. |
int |
getInt(int key,
int defaultValue)
Get integer value assigned with key. |
int[] |
getKeys()
Return array of present keys |
Object |
getObject(int key)
Get object value assigned with key. |
boolean |
has(int key)
|
boolean |
isEmpty()
|
void |
put(int key,
int value)
Set int value of the key. |
void |
put(int key,
Object value)
Set object value of the key. |
void |
remove(int key)
|
int |
size()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public UintMap()
public UintMap(int initialCapacity)
Method Detail |
---|
public boolean isEmpty()
public int size()
public boolean has(int key)
public Object getObject(int key)
public int getInt(int key, int defaultValue)
public int getExistingInt(int key)
RuntimeException
- if key does not existpublic void put(int key, Object value)
public void put(int key, int value)
public void remove(int key)
public void clear()
public int[] getKeys()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |