|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.pentaho.reporting.libraries.base.util.LinkedMap
public class LinkedMap
A fast linked-hashmap that avoids any unneccessay work. It is slightly slower than an ordinary hashmap but faster than a combined hashmap and list-index that would be needed to get this functionality on JDK 1.2. The map is as fast as the LinkedHashMap of JDK 1.4+.
Constructor Summary | |
---|---|
LinkedMap()
Default constructor. |
|
LinkedMap(int initialCapacity,
float loadFactor)
Creates a new map with the given initial number of buckets and the given loadfactor. |
Method Summary | |
---|---|
void |
clear()
Clears the map and removes all map records. |
Object |
clone()
Clones this map. |
boolean |
containsKey(Object key)
Checks, whether the map contains an entry for the key. |
Object |
get(Object key)
Retrieves the object stored under the given key from the map. |
boolean |
isEmpty()
Checks whether this collection is empty. |
Object[] |
keys()
Returns the keys used in this map as array. |
Object[] |
keys(Object[] data)
Returns the keys used in this map as array. |
Object |
put(Object key,
Object value)
Stores the given value in the map using the provided key. |
Object |
remove(Object key)
Removes the object stored under the given key from the map. |
int |
size()
Returns the number of entries in the map. |
Object[] |
values()
Returns the values used in this map as array. |
Object[] |
values(Object[] data)
Returns the values used in this map as array. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LinkedMap()
public LinkedMap(int initialCapacity, float loadFactor)
initialCapacity
- the initial capacity.loadFactor
- the load factor of the bucket-array.Method Detail |
---|
public int size()
public Object put(Object key, Object value)
key
- the key.value
- the value to be stored under the key.
public Object get(Object key)
key
- the key for which a value should be located.
public Object remove(Object key)
key
- the key for which a value should be located.
public boolean containsKey(Object key)
key
- the key for which a value should be located.
public Object[] keys(Object[] data)
data
- the object array that should receive the keys.
public Object[] keys()
public Object[] values()
public Object[] values(Object[] data)
data
- the object array that should receive the values.
public void clear()
public Object clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
public boolean isEmpty()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |