|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.erights.e.elib.tables.IdentityMap
Untamed:
Field Summary | |
private IdentityKeyColumn |
myKeys
|
private float |
myLoadFactor
The load factor for the map. |
private ShareCount |
myShareCount
|
private int |
mySizeThreshold
The current size threshold for the map, that is, the number of elements to hold before growing. |
private Column |
myValues
|
Constructor Summary | |
|
IdentityMap()
Enabled: Reasonable defaults |
|
IdentityMap(Class keyType,
Class valueType)
Enabled: Reasonable defaults |
|
IdentityMap(Class keyType,
Class valueType,
int initCapacity)
Enabled: |
|
IdentityMap(Class keyType,
Class valueType,
int initCapacity,
float loadFactor)
Enabled: |
private |
IdentityMap(IdentityKeyColumn keys,
Column values)
Reasonable defaults |
private |
IdentityMap(IdentityKeyColumn keys,
Column values,
float loadFactor)
|
private |
IdentityMap(IdentityKeyColumn keys,
Column values,
float loadFactor,
ShareCount shareCount)
|
|
IdentityMap(int initialCapacity)
Enabled: Reasonable defaults |
|
IdentityMap(int initialCapacity,
float loadFactor)
Enabled: Reasonable defaults |
Method Summary | |
IdentityMap |
diverge(Class kType,
Class vType)
Enabled: Unlike java.util.Hashtable, this part efficiently makes a lazy copy by copy-on-write sharing. |
Object |
get(Object key)
Enabled: Returns the value to which the key is mapped in this map. |
Object |
get(Object key,
Object instead)
Enabled: Returns the value to which the key is mapped in this map. |
Object |
getKeys(Class type)
Enabled: |
Object |
getValues(Class type)
Enabled: |
void |
iterate(AssocFunc func)
Enabled: |
Class |
keyType()
Enabled: All keys in this map must be of this type |
boolean |
maps(Object key)
Enabled: Returns true if the specified object is a key in the collection, as defined by the equality function of the collection. |
void |
put(Object key,
Object value)
Enabled: Defaults to not strict |
void |
put(Object key,
Object value,
boolean strict)
Enabled: |
private void |
rehash()
|
void |
removeAll()
Enabled: Rather than doing a write-fault (which would make a private copy to be immediately dropped) this decrements the sharing count and re-initializes. |
void |
removeKey(Object key)
Enabled: Defaults to not strict |
void |
removeKey(Object key,
boolean strict)
Enabled: |
int |
size()
Enabled: The number of keys in the collection |
Class |
valueType()
Enabled: All values in this map must be of this type |
private void |
writeFault()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private IdentityKeyColumn myKeys
private Column myValues
private int mySizeThreshold
private float myLoadFactor
private ShareCount myShareCount
Constructor Detail |
public IdentityMap()
public IdentityMap(int initialCapacity)
public IdentityMap(int initialCapacity, float loadFactor)
public IdentityMap(Class keyType, Class valueType)
private IdentityMap(IdentityKeyColumn keys, Column values)
private IdentityMap(IdentityKeyColumn keys, Column values, float loadFactor)
private IdentityMap(IdentityKeyColumn keys, Column values, float loadFactor, ShareCount shareCount)
public IdentityMap(Class keyType, Class valueType, int initCapacity)
public IdentityMap(Class keyType, Class valueType, int initCapacity, float loadFactor)
Method Detail |
public Object get(Object key) throws IndexOutOfBoundsException
IndexOutOfBoundsException
public Object get(Object key, Object instead)
public int size()
public void iterate(AssocFunc func)
iterate
in interface Iteratable
public boolean maps(Object key)
key
- the object to look for
public Object getKeys(Class type)
public Object getValues(Class type)
public void put(Object key, Object value)
public void put(Object key, Object value, boolean strict)
private void rehash()
public void removeKey(Object key)
public void removeKey(Object key, boolean strict)
public void removeAll()
public IdentityMap diverge(Class kType, Class vType)
public Class keyType()
public Class valueType()
private void writeFault()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |