public class IdentityWeakHashMap<K,V>
extends java.util.AbstractMap<K,V>
implements java.util.Map<K,V>, java.lang.Cloneable, java.io.Serializable
Constructor and Description |
---|
IdentityWeakHashMap()
Constructs a new IdentityWeakHashMap with a default initial
capacity of 32 and a loadfactor of 0.75.
|
IdentityWeakHashMap(int initialCapacity)
Constructs a new IdentityWeakHashMap with the given
initial capacity and a default loadFactor of 0.75.
|
IdentityWeakHashMap(int initialCapacity,
float loadFactor)
Constructs a new IdentityWeakHashMap with the given
initial capacity and the given loadFactor.
|
IdentityWeakHashMap(java.util.Map m)
Constructs a new IdentityWeakHashMap with the same mappings
as the given map.
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
Removes all of the mappings from this IdentityWeakHashMap.
|
java.lang.Object |
clone()
Returns a shallow copy of this IdentityWeakHashMap (the
elements are not cloned).
|
boolean |
containsKey(java.lang.Object key)
Returns true if this IdentityWeakHashMap contains a
mapping for the given key.
|
boolean |
containsValue(java.lang.Object obj)
Returns true if this IdentityWeakHashMap contains
the given object.
|
java.util.Set |
entrySet()
Returns a collection view of the mappings contained in this
IdentityWeakHashMap.
|
V |
get(java.lang.Object key)
Returns the value to which the given key is mapped in this
IdentityWeakHashMap.
|
boolean |
isEmpty() |
java.util.Set |
keySet()
Returns a set view of the keys contained in this
IdentityWeakHashMap.
|
V |
put(K key,
V obj)
Associate the given object with the given key in this
IdentityWeakHashMap, replacing any existing mapping.
|
void |
putAll(java.util.Map<? extends K,? extends V> m)
Copies all of the mappings from the given map to this
IdentityWeakHashMap, replacing any existing mappings.
|
V |
remove(java.lang.Object key)
Removes the mapping (key and its corresponding value) from this
IdentityWeakHashMap, if present.
|
int |
size() |
java.util.Collection |
values()
Returns a collection view of the values contained in this
IdentityWeakHashMap.
|
public IdentityWeakHashMap(int initialCapacity, float loadFactor)
initialCapacity
- the initial capacity of this
IdentityWeakHashMap.loadFactor
- the loadFactor of the IdentityWeakHashMap.java.lang.IllegalArgumentException
- if the initial capacity is less
than zero, or if the loadFactor is nonpositive.public IdentityWeakHashMap(int initialCapacity)
initialCapacity
- the initial capacity of the
IdentityWeakHashMap.IllegalArgumentException
- if the initial capacity is less
than zero.public IdentityWeakHashMap()
public IdentityWeakHashMap(java.util.Map m)
m
- the map whose mappings are to be placed in the
IdentityWeakHashMap.public int size()
public boolean isEmpty()
public boolean containsValue(java.lang.Object obj)
public boolean containsKey(java.lang.Object key)
public V get(java.lang.Object key)
public V put(K key, V obj)
put
in interface java.util.Map<K,V>
put
in class java.util.AbstractMap<K,V>
key
- key to map to given object.obj
- object to be associated with key.NullPointerException
- if obj is null.public V remove(java.lang.Object key)
public void putAll(java.util.Map<? extends K,? extends V> m)
public void clear()
public java.lang.Object clone()
public java.util.Set keySet()
public java.util.Collection values()
public java.util.Set entrySet()
EclipseLink 2.6.3, "build v20160428-59c81c5" API Reference