ice.util.alg
Class HashArray
java.lang.Object
ice.util.alg.HashArray
- public class HashArray
- extends Object
Hashtable implemenation that allow synchronization-free read access.
It also can be used as a spare array with direct support for indexed
entries
HashArray
public HashArray()
HashArray
public HashArray(Object lock)
HashArray
public HashArray(int initialCapacity)
HashArray
public HashArray(Object lock,
int initialCapacity)
clone
public Object clone()
setEntryPrototype
public void setEntryPrototype(HashArray.Entry entryPrototype)
setComparator
public void setComparator(Comparator comparator)
synchronizationLock
public final Object synchronizationLock()
setSynchronizationLock
public Object setSynchronizationLock(Object new_lock)
isEmpty
public boolean isEmpty()
size
public int size()
isSealed
public final boolean isSealed()
sealObject
public void sealObject()
getEntry
public HashArray.Entry getEntry(Object key)
getEntry
public HashArray.Entry getEntry(int index)
has
public final boolean has(Object key)
has
public final boolean has(int index)
get
public final Object get(Object key)
get
public final Object get(int index)
ensureEntry
public HashArray.Entry ensureEntry(Object key)
ensureEntry
public HashArray.Entry ensureEntry(int index)
put
public final Object put(Object key,
Object value)
put
public final Object put(int index,
Object value)
setValue
public final void setValue(Object key,
Object value)
setValue
public final void setValue(int index,
Object value)
remove
public Object remove(Object key)
remove
public Object remove(int index)
clear
public void clear()
newIterator
public HashArray.Iterator newIterator()
getEntries
public HashArray.Entry[] getEntries()
getObjectKeys
public void getObjectKeys(Object[] result,
int offset)
- Fill
result array by all object kyes starting from
offset.
result should be big enough to hold all object keys
getValues
public Object[] getValues()
getValues
public void getValues(Object[] result,
int offset)
- Fill
result array by all object kyes starting from
offset.
result should be big enough to hold all object keys