org.apache.avro.util
Class WeakIdentityHashMap<K,V>
java.lang.Object
   org.apache.avro.util.WeakIdentityHashMap<K,V>
org.apache.avro.util.WeakIdentityHashMap<K,V>
- All Implemented Interfaces: 
- Map<K,V>
- public class WeakIdentityHashMap<K,V> 
- extends Object- implements Map<K,V>
Implements a combination of WeakHashMap and IdentityHashMap.
 Useful for caches that need to key off of a == comparison
 instead of a .equals.
 
 
 This class is not a general-purpose Map implementation! While
 this class implements the Map interface, it intentionally violates
 Map's general contract, which mandates the use of the equals method
 when comparing objects. This class is designed for use only in the
 rare cases wherein reference-equality semantics are required.
 
 Note that this implementation is not synchronized.
 
 
| Nested classes/interfaces inherited from interface java.util.Map | 
| Map.Entry<K,V> | 
 
 
 
 
WeakIdentityHashMap
public WeakIdentityHashMap()
clear
public void clear()
- 
- Specified by:
- clearin interface- Map<K,V>
 
- 
 
containsKey
public boolean containsKey(Object key)
- 
- Specified by:
- containsKeyin interface- Map<K,V>
 
- 
 
containsValue
public boolean containsValue(Object value)
- 
- Specified by:
- containsValuein interface- Map<K,V>
 
- 
 
entrySet
public Set<Map.Entry<K,V>> entrySet()
- 
- Specified by:
- entrySetin interface- Map<K,V>
 
- 
 
keySet
public Set<K> keySet()
- 
- Specified by:
- keySetin interface- Map<K,V>
 
- 
 
equals
public boolean equals(Object o)
- 
- Specified by:
- equalsin interface- Map<K,V>
- Overrides:
- equalsin class- Object
 
- 
 
get
public V get(Object key)
- 
- Specified by:
- getin interface- Map<K,V>
 
- 
 
put
public V put(K key,
             V value)
- 
- Specified by:
- putin interface- Map<K,V>
 
- 
 
hashCode
public int hashCode()
- 
- Specified by:
- hashCodein interface- Map<K,V>
- Overrides:
- hashCodein class- Object
 
- 
 
isEmpty
public boolean isEmpty()
- 
- Specified by:
- isEmptyin interface- Map<K,V>
 
- 
 
putAll
public void putAll(Map t)
- 
- Specified by:
- putAllin interface- Map<K,V>
 
- 
 
remove
public V remove(Object key)
- 
- Specified by:
- removein interface- Map<K,V>
 
- 
 
size
public int size()
- 
- Specified by:
- sizein interface- Map<K,V>
 
- 
 
values
public Collection<V> values()
- 
- Specified by:
- valuesin interface- Map<K,V>
 
- 
 
Copyright © 2010 The Apache Software Foundation