org.jboss.cache.marshall
Class MarshalledValueMap

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

@Immutable
public class MarshalledValueMap
extends Object
implements Map, 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
Map.Entry<K,V>
 
Constructor Summary
MarshalledValueMap()
           
MarshalledValueMap(Map delegate)
           
 
Method Summary
 void clear()
           
 boolean containsKey(Object key)
           
 boolean containsValue(Object value)
           
 Set entrySet()
           
 boolean equals(Object other)
           
 Object get(Object key)
           
protected  Map getUnmarshalledMap()
           
 int hashCode()
           
 boolean isEmpty()
           
 Set keySet()
           
 Object put(Object key, Object value)
           
 void putAll(Map t)
           
 void readExternal(ObjectInput in)
           
 Object remove(Object key)
           
 int size()
           
protected  Map unmarshalledMap(Set entries)
           
 Collection values()
           
 void writeExternal(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(Map delegate)
Method Detail

getUnmarshalledMap

protected Map getUnmarshalledMap()

size

public int size()
Specified by:
size in interface Map

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface Map

containsKey

public boolean containsKey(Object key)
Specified by:
containsKey in interface Map

containsValue

public boolean containsValue(Object value)
Specified by:
containsValue in interface Map

get

public Object get(Object key)
Specified by:
get in interface Map

put

public Object put(Object key,
                  Object value)
Specified by:
put in interface Map

remove

public Object remove(Object key)
Specified by:
remove in interface Map

putAll

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

clear

public void clear()
Specified by:
clear in interface Map

keySet

public Set keySet()
Specified by:
keySet in interface Map

values

public Collection values()
Specified by:
values in interface Map

entrySet

public Set entrySet()
Specified by:
entrySet in interface Map

unmarshalledMap

protected Map unmarshalledMap(Set entries)

equals

public boolean equals(Object other)
Specified by:
equals in interface Map
Overrides:
equals in class Object

hashCode

public int hashCode()
Specified by:
hashCode in interface Map
Overrides:
hashCode in class Object

writeExternal

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

readExternal

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


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