org.castor.util

Class IdentityMap

public final class IdentityMap extends 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.

Since: 0.9.9

Version: $Revision: 6230 $ $Date: 2006-04-13 10:49:49 -0600 (Thu, 13 Apr 2006) $

Author: Ralf Joachim

Nested Class Summary
classIdentityMap.Entry
An entry of the IdentityMap.
Method Summary
voidclear()
booleancontainsKey(Object key)
booleancontainsValue(Object value)
In contrast with the design contract of the Map interface this method has not been implemented and throws a UnsupportedOperationException.
SetentrySet()
In contrast with the design contract of the Map interface this method has not been implemented and throws a UnsupportedOperationException.
Objectget(Object key)
booleanisEmpty()
SetkeySet()
Objectput(Object key, Object value)
voidputAll(Map map)
This optional method has not been implemented for IdentityMap instead it throws a UnsupportedOperationException as defined in the Map interface.
Objectremove(Object key)
intsize()
Collectionvalues()
In contrast with the design contract of the Map interface this method has not been implemented and throws a UnsupportedOperationException.

Method Detail

clear

public void clear()
{@inheritDoc }

See Also: java.util.Map#clear()

containsKey

public boolean containsKey(Object key)
{@inheritDoc }

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. {@inheritDoc }

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. {@inheritDoc }

See Also: java.util.Map#entrySet()

get

public Object get(Object key)
{@inheritDoc }

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

isEmpty

public boolean isEmpty()
{@inheritDoc }

See Also: java.util.Map#isEmpty()

keySet

public Set keySet()
{@inheritDoc }

See Also: java.util.Map#keySet()

put

public Object put(Object key, Object value)
{@inheritDoc }

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. {@inheritDoc }

See Also: java.util.Map#putAll

remove

public Object remove(Object key)
{@inheritDoc }

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

size

public int size()
{@inheritDoc }

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. {@inheritDoc }

See Also: java.util.Map#values()

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