Package org.castor.core.util
Class IdentityMap
- java.lang.Object
-
- org.castor.core.util.IdentityMap
-
- All Implemented Interfaces:
java.util.Map
public final class IdentityMap extends java.lang.Object implements java.util.MapAn IdentityMap that uses reference-equality instead of object-equality. According to its special function it violates some design contracts of theMapinterface.- Since:
- 0.9.9
- Version:
- $Revision: 7491 $ $Date: 2006-04-13 10:49:49 -0600 (Thu, 13 Apr 2006) $
- Author:
- Ralf Joachim
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classIdentityMap.EntryAn entry of theIdentityMap.
-
Constructor Summary
Constructors Constructor Description IdentityMap()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()booleancontainsKey(java.lang.Object key)booleancontainsValue(java.lang.Object value)In contrast with the design contract of theMapinterface this method has not been implemented and throws aUnsupportedOperationException.java.util.SetentrySet()In contrast with the design contract of theMapinterface this method has not been implemented and throws aUnsupportedOperationException.java.lang.Objectget(java.lang.Object key)booleanisEmpty()java.util.SetkeySet()java.lang.Objectput(java.lang.Object key, java.lang.Object value)voidputAll(java.util.Map map)This optional method has not been implemented forIdentityMapinstead it throws aUnsupportedOperationExceptionas defined in theMapinterface.java.lang.Objectremove(java.lang.Object key)intsize()java.util.Collectionvalues()In contrast with the design contract of theMapinterface this method has not been implemented and throws aUnsupportedOperationException.
-
-
-
Method Detail
-
clear
public void clear()
- Specified by:
clearin interfacejava.util.Map- See Also:
Map.clear()
-
size
public int size()
- Specified by:
sizein interfacejava.util.Map- See Also:
Map.size()
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfacejava.util.Map- See Also:
Map.isEmpty()
-
put
public java.lang.Object put(java.lang.Object key, java.lang.Object value)- Specified by:
putin interfacejava.util.Map- See Also:
Map.put(java.lang.Object, java.lang.Object)
-
containsKey
public boolean containsKey(java.lang.Object key)
- Specified by:
containsKeyin interfacejava.util.Map- See Also:
Map.containsKey(java.lang.Object)
-
get
public java.lang.Object get(java.lang.Object key)
- Specified by:
getin interfacejava.util.Map- See Also:
Map.get(java.lang.Object)
-
remove
public java.lang.Object remove(java.lang.Object key)
- Specified by:
removein interfacejava.util.Map- See Also:
Map.remove(java.lang.Object)
-
keySet
public java.util.Set keySet()
- Specified by:
keySetin interfacejava.util.Map- See Also:
Map.keySet()
-
entrySet
public java.util.Set entrySet()
In contrast with the design contract of theMapinterface this method has not been implemented and throws aUnsupportedOperationException.- Specified by:
entrySetin interfacejava.util.Map- See Also:
Map.entrySet()
-
values
public java.util.Collection values()
In contrast with the design contract of theMapinterface this method has not been implemented and throws aUnsupportedOperationException.- Specified by:
valuesin interfacejava.util.Map- See Also:
Map.values()
-
containsValue
public boolean containsValue(java.lang.Object value)
In contrast with the design contract of theMapinterface this method has not been implemented and throws aUnsupportedOperationException.- Specified by:
containsValuein interfacejava.util.Map- See Also:
Map.containsValue(java.lang.Object)
-
putAll
public void putAll(java.util.Map map)
This optional method has not been implemented forIdentityMapinstead it throws aUnsupportedOperationExceptionas defined in theMapinterface.- Specified by:
putAllin interfacejava.util.Map- See Also:
Map.putAll(java.util.Map<? extends K, ? extends V>)
-
-