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, toString
finalize, getClass, notify, notifyAll, wait, wait, wait
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
protected 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 Map
size
in class AbstractMap
public boolean isEmpty()
isEmpty
in interface Map
isEmpty
in class AbstractMap
public boolean containsValue(Object obj)
containsValue
in interface Map
containsValue
in class AbstractMap
obj
- the object to find.NullPointerException
- if obj is null.public boolean containsKey(Object key)
containsKey
in interface Map
containsKey
in class AbstractMap
key
- object to be used as a key into this
TopLinkIdentityHashMap.public Object get(Object key)
get
in interface Map
get
in class AbstractMap
key
- key whose associated value is to be returned.public Object put(Object key, Object obj)
put
in interface Map
put
in class AbstractMap
key
- 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 Map
remove
in class AbstractMap
key
- key whose mapping is to be removed from the map.public void putAll(Map m)
putAll
in interface Map
putAll
in class AbstractMap
m
- mappings to be stored in this TopLinkIdentityHashMap.NullPointerException
- if m is null.public void clear()
clear
in interface Map
clear
in class AbstractMap
public Object clone()
clone
in class AbstractMap
public Set keySet()
keySet
in interface Map
keySet
in class AbstractMap
public Collection values()
values
in interface Map
values
in class AbstractMap
public Set entrySet()
entrySet
in interface Map
entrySet
in class AbstractMap
Copyright © 2023. All rights reserved.