public class IdentityHashtable
extends java.util.Dictionary
implements java.lang.Cloneable, java.io.Serializable
| Modifier and Type | Field and Description |
|---|---|
protected int |
count |
protected oracle.toplink.essentials.internal.helper.IdentityHashtable.Entry[] |
entries |
protected float |
loadFactor |
protected int |
threshold |
| Constructor and Description |
|---|
IdentityHashtable()
Constructs a new IdentityHashtable with a default initial
capacity of 32 and a loadfactor of 0.75.
|
IdentityHashtable(int initialCapacity)
Constructs a new IdentityHashtable with the given
initial capacity and a default loadFactor of 0.75.
|
IdentityHashtable(int initialCapacity,
float loadFactor)
Constructs a new IdentityHashtable with the given
initial capacity and the given loadFactor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Removes all of the mappings from this IdentityHashtable.
|
java.lang.Object |
clone()
Returns a shallow copy of this IdentityHashtable (the
elements are not cloned).
|
boolean |
contains(java.lang.Object obj)
Returns true if this IdentityHashtable contains
the given object.
|
boolean |
containsKey(java.lang.Object key)
Returns true if this IdentityHashtable contains a
mapping for the given key.
|
java.util.Enumeration |
elements() |
java.lang.Object |
get(java.lang.Object key)
Returns the value to which the given key is mapped in this
IdentityHashtable.
|
boolean |
isEmpty() |
java.util.Enumeration |
keys() |
java.lang.Object |
put(java.lang.Object key,
java.lang.Object obj)
Associate the given object with the given key in this
IdentityHashtable, replacing any existing mapping.
|
java.lang.Object |
remove(java.lang.Object key)
Removes the mapping (key and its corresponding value) from this
IdentityHashtable, if present.
|
int |
size() |
java.lang.String |
toString()
Return the string representation of this IdentityHashtable.
|
protected transient oracle.toplink.essentials.internal.helper.IdentityHashtable.Entry[] entries
protected transient int count
protected int threshold
protected float loadFactor
public IdentityHashtable(int initialCapacity,
float loadFactor)
initialCapacity - the initial capacity of this
IdentityHashtable.loadFactor - the loadFactor of the IdentityHashtable.java.lang.IllegalArgumentException - if the initial capacity is less
than zero, or if the loadFactor is nonpositive.public IdentityHashtable(int initialCapacity)
initialCapacity - the initial capacity of the
IdentityHashtable.IllegalArgumentException - if the initial capacity is less
than zero.public IdentityHashtable()
public void clear()
public java.lang.Object clone()
clone in class java.lang.Objectpublic boolean contains(java.lang.Object obj)
obj - the object to find.NullPointerException - if obj is null.public boolean containsKey(java.lang.Object key)
key - object to be used as a key into this
IdentityHashtable.public java.util.Enumeration elements()
elements in class java.util.Dictionarypublic java.lang.Object get(java.lang.Object key)
get in class java.util.Dictionarykey - key whose associated value is to be returned.public boolean isEmpty()
isEmpty in class java.util.Dictionarypublic java.util.Enumeration keys()
keys in class java.util.Dictionarypublic java.lang.Object put(java.lang.Object key,
java.lang.Object obj)
put in class java.util.Dictionarykey - key to map to given object.obj - object to be associated with key.NullPointerException - if obj is null.public java.lang.Object remove(java.lang.Object key)
remove in class java.util.Dictionarykey - key whose mapping is to be removed from the map.public int size()
size in class java.util.Dictionarypublic java.lang.String toString()
toString in class java.lang.Object