org.jboss.cache.marshall
Class MarshalledValueMap

java.lang.Object
  extended by org.jboss.cache.marshall.MarshalledValueMap
All Implemented Interfaces:
java.io.Externalizable, java.io.Serializable, java.util.Map

@Immutable
public class MarshalledValueMap
extends java.lang.Object
implements java.util.Map, java.io.Externalizable

A Map that is able to wrap/unwrap MarshalledValues in keys or values. Note that calling keySet(), entrySet() or values() could be expensive if this map is large!!

Also note that this is an immutable Map.

Since:
2.1.0
Author:
Manik Surtani (manik AT jboss DOT org)
See Also:
MarshalledValue, Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
java.util.Map.Entry<K,V>
 
Constructor Summary
MarshalledValueMap()
           
MarshalledValueMap(java.util.Map delegate)
           
 
Method Summary
 void clear()
           
 boolean containsKey(java.lang.Object key)
           
 boolean containsValue(java.lang.Object value)
           
 java.util.Set entrySet()
           
 boolean equals(java.lang.Object other)
           
 java.lang.Object get(java.lang.Object key)
           
protected  java.util.Map getUnmarshalledMap()
           
 int hashCode()
           
 boolean isEmpty()
           
 java.util.Set keySet()
           
 java.lang.Object put(java.lang.Object key, java.lang.Object value)
           
 void putAll(java.util.Map t)
           
 void readExternal(java.io.ObjectInput in)
           
 java.lang.Object remove(java.lang.Object key)
           
 int size()
           
protected  java.util.Map unmarshalledMap(java.util.Set entries)
           
 java.util.Collection values()
           
 void writeExternal(java.io.ObjectOutput out)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MarshalledValueMap

public MarshalledValueMap()

MarshalledValueMap

public MarshalledValueMap(java.util.Map delegate)
Method Detail

getUnmarshalledMap

protected java.util.Map getUnmarshalledMap()

size

public int size()
Specified by:
size in interface java.util.Map

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface java.util.Map

containsKey

public boolean containsKey(java.lang.Object key)
Specified by:
containsKey in interface java.util.Map

containsValue

public boolean containsValue(java.lang.Object value)
Specified by:
containsValue in interface java.util.Map

get

public java.lang.Object get(java.lang.Object key)
Specified by:
get in interface java.util.Map

put

public java.lang.Object put(java.lang.Object key,
                            java.lang.Object value)
Specified by:
put in interface java.util.Map

remove

public java.lang.Object remove(java.lang.Object key)
Specified by:
remove in interface java.util.Map

putAll

public void putAll(java.util.Map t)
Specified by:
putAll in interface java.util.Map

clear

public void clear()
Specified by:
clear in interface java.util.Map

keySet

public java.util.Set keySet()
Specified by:
keySet in interface java.util.Map

values

public java.util.Collection values()
Specified by:
values in interface java.util.Map

entrySet

public java.util.Set entrySet()
Specified by:
entrySet in interface java.util.Map

unmarshalledMap

protected java.util.Map unmarshalledMap(java.util.Set entries)

equals

public boolean equals(java.lang.Object other)
Specified by:
equals in interface java.util.Map
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Specified by:
hashCode in interface java.util.Map
Overrides:
hashCode in class java.lang.Object

writeExternal

public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException
Specified by:
writeExternal in interface java.io.Externalizable
Throws:
java.io.IOException

readExternal

public void readExternal(java.io.ObjectInput in)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
Specified by:
readExternal in interface java.io.Externalizable
Throws:
java.io.IOException
java.lang.ClassNotFoundException


Copyright © 2009 JBoss, a division of Red Hat. All Rights Reserved.