Package org.castor.core.util
Class IdentityMap
java.lang.Object
org.castor.core.util.IdentityMap
- All Implemented Interfaces:
Map
An IdentityMap that uses reference-equality instead of object-equality. According
to its special function it violates some design contracts of the
Map
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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
boolean
containsKey
(Object key) boolean
containsValue
(Object value) In contrast with the design contract of theMap
interface this method has not been implemented and throws aUnsupportedOperationException
.entrySet()
In contrast with the design contract of theMap
interface this method has not been implemented and throws aUnsupportedOperationException
.boolean
isEmpty()
keySet()
void
This optional method has not been implemented forIdentityMap
instead it throws aUnsupportedOperationException
as defined in theMap
interface.int
size()
values()
In contrast with the design contract of theMap
interface this method has not been implemented and throws aUnsupportedOperationException
.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
IdentityMap
public IdentityMap()
-
-
Method Details
-
clear
public void clear() -
size
public int size() -
isEmpty
public boolean isEmpty() -
put
-
containsKey
- Specified by:
containsKey
in interfaceMap
- See Also:
-
get
-
remove
-
keySet
-
entrySet
In contrast with the design contract of theMap
interface this method has not been implemented and throws aUnsupportedOperationException
. -
values
In contrast with the design contract of theMap
interface this method has not been implemented and throws aUnsupportedOperationException
. -
containsValue
In contrast with the design contract of theMap
interface this method has not been implemented and throws aUnsupportedOperationException
.- Specified by:
containsValue
in interfaceMap
- See Also:
-
putAll
This optional method has not been implemented forIdentityMap
instead it throws aUnsupportedOperationException
as defined in theMap
interface.
-