org.castor.util

Class IdentityMap

Implemented Interfaces:
Map

public final class IdentityMap
extends java.lang.Object
implements 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.
Version:
$Revision: 6230 $ $Date: 2006-04-13 10:49:49 -0600 (Thu, 13 Apr 2006) $
Author:
Ralf Joachim
Since:
0.9.9

Nested Class Summary

class
IdentityMap.Entry
An entry of the IdentityMap.

Method Summary

void
clear()
boolean
containsKey(Object key)
boolean
containsValue(Object value)
In contrast with the design contract of the Map interface this method has not been implemented and throws a UnsupportedOperationException.
Set
entrySet()
In contrast with the design contract of the Map interface this method has not been implemented and throws a UnsupportedOperationException.
Object
get(Object key)
boolean
isEmpty()
Set
keySet()
Object
put(Object key, Object value)
void
putAll(Map map)
This optional method has not been implemented for IdentityMap instead it throws a UnsupportedOperationException as defined in the Map interface.
Object
remove(Object key)
int
size()
Collection
values()
In contrast with the design contract of the Map interface this method has not been implemented and throws a UnsupportedOperationException.

Method Details

clear

public void clear()
See Also:
java.util.Map.clear()

containsKey

public boolean containsKey(Object key)
See Also:
java.util.Map.containsKey(java.lang.Object)

containsValue

public boolean containsValue(Object value)
In contrast with the design contract of the Map interface this method has not been implemented and throws a UnsupportedOperationException.
See Also:
java.util.Map.containsValue

entrySet

public Set entrySet()
In contrast with the design contract of the Map interface this method has not been implemented and throws a UnsupportedOperationException.
See Also:
java.util.Map.entrySet()

get

public Object get(Object key)
See Also:
java.util.Map.get(java.lang.Object)

isEmpty

public boolean isEmpty()
See Also:
java.util.Map.isEmpty()

keySet

public Set keySet()
See Also:
java.util.Map.keySet()

put

public Object put(Object key,
                  Object value)
See Also:
java.util.Map.put(java.lang.Object, java.lang.Object)

putAll

public void putAll(Map map)
This optional method has not been implemented for IdentityMap instead it throws a UnsupportedOperationException as defined in the Map interface.
See Also:
java.util.Map.putAll

remove

public Object remove(Object key)
See Also:
java.util.Map.remove(java.lang.Object)

size

public int size()
See Also:
java.util.Map.size()

values

public Collection values()
In contrast with the design contract of the Map interface this method has not been implemented and throws a UnsupportedOperationException.
See Also:
java.util.Map.values()

Intalio Inc. (C) 1999-2006. All rights reserved http://www.intalio.com