public class TopLinkIdentityHashMap extends AbstractMap implements Map, Cloneable, Serializable
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| Modifier and Type | Field and Description |
|---|---|
protected int |
count |
protected oracle.toplink.essentials.internal.helper.TopLinkIdentityHashMap.Entry[] |
entries |
protected float |
loadFactor |
protected int |
threshold |
| Constructor and Description |
|---|
TopLinkIdentityHashMap()
Constructs a new TopLinkIdentityHashMap with a default initial
capacity of 32 and a loadfactor of 0.75.
|
TopLinkIdentityHashMap(int initialCapacity)
Constructs a new TopLinkIdentityHashMap with the given
initial capacity and a default loadFactor of 0.75.
|
TopLinkIdentityHashMap(int initialCapacity,
float loadFactor)
Constructs a new TopLinkIdentityHashMap with the given
initial capacity and the given loadFactor.
|
TopLinkIdentityHashMap(Map m)
Constructs a new TopLinkIdentityHashMap with the same mappings
as the given map.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Removes all of the mappings from this TopLinkIdentityHashMap.
|
Object |
clone()
Returns a shallow copy of this TopLinkIdentityHashMap (the
elements are not cloned).
|
boolean |
containsKey(Object key)
Returns true if this TopLinkIdentityHashMap contains a
mapping for the given key.
|
boolean |
containsValue(Object obj)
Returns true if this TopLinkIdentityHashMap contains
the given object.
|
Set |
entrySet()
Returns a collection view of the mappings contained in this
TopLinkIdentityHashMap.
|
Object |
get(Object key)
Returns the value to which the given key is mapped in this
TopLinkIdentityHashMap.
|
boolean |
isEmpty() |
Set |
keySet()
Returns a set view of the keys contained in this
TopLinkIdentityHashMap.
|
Object |
put(Object key,
Object obj)
Associate the given object with the given key in this
TopLinkIdentityHashMap, replacing any existing mapping.
|
void |
putAll(Map m)
Copies all of the mappings from the given map to this
TopLinkIdentityHashMap, replacing any existing mappings.
|
Object |
remove(Object key)
Removes the mapping (key and its corresponding value) from this
TopLinkIdentityHashMap, if present.
|
int |
size() |
Collection |
values()
Returns a collection view of the values contained in this
TopLinkIdentityHashMap.
|
equals, hashCode, toStringfinalize, getClass, notify, notifyAll, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAllprotected transient oracle.toplink.essentials.internal.helper.TopLinkIdentityHashMap.Entry[] entries
protected transient int count
protected int threshold
protected float loadFactor
public TopLinkIdentityHashMap(int initialCapacity,
float loadFactor)
initialCapacity - the initial capacity of this
TopLinkIdentityHashMap.loadFactor - the loadFactor of the TopLinkIdentityHashMap.IllegalArgumentException - if the initial capacity is less
than zero, or if the loadFactor is nonpositive.public TopLinkIdentityHashMap(int initialCapacity)
initialCapacity - the initial capacity of the
TopLinkIdentityHashMap.IllegalArgumentException - if the initial capacity is less
than zero.public TopLinkIdentityHashMap()
public TopLinkIdentityHashMap(Map m)
m - the map whose mappings are to be placed in the
TopLinkIdentityHashMap.public int size()
size in interface Mapsize in class AbstractMappublic boolean isEmpty()
isEmpty in interface MapisEmpty in class AbstractMappublic boolean containsValue(Object obj)
containsValue in interface MapcontainsValue in class AbstractMapobj - the object to find.NullPointerException - if obj is null.public boolean containsKey(Object key)
containsKey in interface MapcontainsKey in class AbstractMapkey - object to be used as a key into this
TopLinkIdentityHashMap.public Object get(Object key)
get in interface Mapget in class AbstractMapkey - key whose associated value is to be returned.public Object put(Object key, Object obj)
put in interface Mapput in class AbstractMapkey - key to map to given object.obj - object to be associated with key.NullPointerException - if obj is null.public Object remove(Object key)
remove in interface Mapremove in class AbstractMapkey - key whose mapping is to be removed from the map.public void putAll(Map m)
putAll in interface MapputAll in class AbstractMapm - mappings to be stored in this TopLinkIdentityHashMap.NullPointerException - if m is null.public void clear()
clear in interface Mapclear in class AbstractMappublic Object clone()
clone in class AbstractMappublic Set keySet()
keySet in interface MapkeySet in class AbstractMappublic Collection values()
values in interface Mapvalues in class AbstractMappublic Set entrySet()
entrySet in interface MapentrySet in class AbstractMapCopyright © 2024. All rights reserved.