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.Map
An IdentityMap that uses reference-equality instead of object-equality. According to its special function it violates some design contracts of theMap
interface.- 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 class
IdentityMap.Entry
An entry of theIdentityMap
.
-
Constructor Summary
Constructors Constructor Description IdentityMap()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
boolean
containsKey(java.lang.Object key)
boolean
containsValue(java.lang.Object value)
In contrast with the design contract of theMap
interface this method has not been implemented and throws aUnsupportedOperationException
.java.util.Set
entrySet()
In contrast with the design contract of theMap
interface this method has not been implemented and throws aUnsupportedOperationException
.java.lang.Object
get(java.lang.Object key)
boolean
isEmpty()
java.util.Set
keySet()
java.lang.Object
put(java.lang.Object key, java.lang.Object value)
void
putAll(java.util.Map map)
This optional method has not been implemented forIdentityMap
instead it throws aUnsupportedOperationException
as defined in theMap
interface.java.lang.Object
remove(java.lang.Object key)
int
size()
java.util.Collection
values()
In contrast with the design contract of theMap
interface this method has not been implemented and throws aUnsupportedOperationException
.
-
-
-
Method Detail
-
clear
public void clear()
- Specified by:
clear
in interfacejava.util.Map
- See Also:
Map.clear()
-
size
public int size()
- Specified by:
size
in interfacejava.util.Map
- See Also:
Map.size()
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfacejava.util.Map
- See Also:
Map.isEmpty()
-
put
public java.lang.Object put(java.lang.Object key, java.lang.Object value)
- Specified by:
put
in interfacejava.util.Map
- See Also:
Map.put(java.lang.Object, java.lang.Object)
-
containsKey
public boolean containsKey(java.lang.Object key)
- Specified by:
containsKey
in interfacejava.util.Map
- See Also:
Map.containsKey(java.lang.Object)
-
get
public java.lang.Object get(java.lang.Object key)
- Specified by:
get
in interfacejava.util.Map
- See Also:
Map.get(java.lang.Object)
-
remove
public java.lang.Object remove(java.lang.Object key)
- Specified by:
remove
in interfacejava.util.Map
- See Also:
Map.remove(java.lang.Object)
-
keySet
public java.util.Set keySet()
- Specified by:
keySet
in interfacejava.util.Map
- See Also:
Map.keySet()
-
entrySet
public java.util.Set entrySet()
In contrast with the design contract of theMap
interface this method has not been implemented and throws aUnsupportedOperationException
.- Specified by:
entrySet
in interfacejava.util.Map
- See Also:
Map.entrySet()
-
values
public java.util.Collection values()
In contrast with the design contract of theMap
interface this method has not been implemented and throws aUnsupportedOperationException
.- Specified by:
values
in interfacejava.util.Map
- See Also:
Map.values()
-
containsValue
public boolean containsValue(java.lang.Object value)
In contrast with the design contract of theMap
interface this method has not been implemented and throws aUnsupportedOperationException
.- Specified by:
containsValue
in 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 forIdentityMap
instead it throws aUnsupportedOperationException
as defined in theMap
interface.- Specified by:
putAll
in interfacejava.util.Map
- See Also:
Map.putAll(java.util.Map<? extends K, ? extends V>)
-
-