| java.lang.Object com.google.gwt.dev.js.rhino.UintMap
UintMap | class UintMap implements Serializable(Code) | | 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
author: Igor Bukanov |
Constructor Summary | |
public | UintMap() | public | UintMap(int initialCapacity) |
Method Summary | |
public void | clear() | public int | getExistingInt(int key) Get integer value assigned with key. | public int | getInt(int key, int defaultValue) Get integer value assigned with key. | public int[] | getKeys() | public Object | getObject(int key) Get object value assigned with key. | public boolean | has(int key) | public boolean | isEmpty() | public void | put(int key, Object value) Set object value of the key. | public void | put(int key, int value) Set int value of the key. | public void | remove(int key) | public int | size() |
serialVersionUID | final static long serialVersionUID(Code) | | |
UintMap | public UintMap(int initialCapacity)(Code) | | |
clear | public void clear()(Code) | | |
getExistingInt | public int getExistingInt(int key)(Code) | | Get integer value assigned with key.
key integer value or defaultValue if key does not exist or doesnot have int value throws: RuntimeException - if key does not exist |
getInt | public int getInt(int key, int defaultValue)(Code) | | Get integer value assigned with key.
key integer value or defaultValue if key is absent |
getKeys | public int[] getKeys()(Code) | | Return array of present keys
|
getObject | public Object getObject(int key)(Code) | | Get object value assigned with key.
key object value or null if key is absent |
has | public boolean has(int key)(Code) | | |
isEmpty | public boolean isEmpty()(Code) | | |
put | public void put(int key, Object value)(Code) | | Set object value of the key.
If key does not exist, also set its int value to 0.
|
put | public void put(int key, int value)(Code) | | Set int value of the key.
If key does not exist, also set its object value to null.
|
remove | public void remove(int key)(Code) | | |
|
|