CoherenceTM v3.3
Copyright© 2000-2007 by Oracle Corporation

com.tangosol.util
Class NullImplementation.NullMap

java.lang.Object
  extended by java.util.AbstractMap
      extended by com.tangosol.util.NullImplementation.NullMap
All Implemented Interfaces:
ExternalizableLite, PortableObject, Serializable, Map
Direct Known Subclasses:
NullImplementation.NullObservableMap
Enclosing class:
NullImplementation

public static class NullImplementation.NullMap
extends AbstractMap
implements Map, Serializable, ExternalizableLite, PortableObject

A Map that contains nothing and does nothing.


Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry
 
Field Summary
static Map INSTANCE
          Since the Map contains no information, only one ever has to exist.
 
Constructor Summary
NullImplementation.NullMap()
          Default constructor (for ExternalizableLite and PortableObject).
 
Method Summary
 boolean containsKey(Object key)
           
 boolean containsValue(Object value)
           
 Set entrySet()
           
 boolean equals(Object o)
           
 Object get(Object key)
           
 int hashCode()
           
 Set keySet()
           
 Object put(Object key, Object value)
           
 void putAll(Map map)
           
 void readExternal(DataInput in)
          Restore the contents of this object by loading the object's state from the passed DataInput object.
 void readExternal(PofReader in)
          Restore the contents of a user type instance by reading its state using the specified PofReader object.
 Object remove(Object key)
           
 int size()
           
 Collection values()
           
 void writeExternal(DataOutput out)
          Save the contents of this object by storing the object's state into the passed DataOutput object.
 void writeExternal(PofWriter out)
          Save the contents of a POF user type instance by writing its state using the specified PofWriter object.
 
Methods inherited from class java.util.AbstractMap
clear, clone, isEmpty, toString
 
Methods inherited from interface java.util.Map
clear, isEmpty
 

Field Detail

INSTANCE

public static final Map INSTANCE
Since the Map contains no information, only one ever has to exist.

Constructor Detail

NullImplementation.NullMap

public NullImplementation.NullMap()
Default constructor (for ExternalizableLite and PortableObject).

Method Detail

size

public int size()
Specified by:
size in interface Map
Overrides:
size in class AbstractMap

get

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

put

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

putAll

public void putAll(Map map)
Specified by:
putAll in interface Map
Overrides:
putAll in class AbstractMap

remove

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

containsKey

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

containsValue

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

entrySet

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

keySet

public Set keySet()
Specified by:
keySet in interface Map
Overrides:
keySet in class AbstractMap

values

public Collection values()
Specified by:
values in interface Map
Overrides:
values in class AbstractMap

equals

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

hashCode

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

readExternal

public void readExternal(DataInput in)
                  throws IOException
Restore the contents of this object by loading the object's state from the passed DataInput object.

Specified by:
readExternal in interface ExternalizableLite
Parameters:
in - the DataInput stream to read data from in order to restore the state of this object
Throws:
IOException - if an I/O exception occurs
NotActiveException - if the object is not in its initial state, and therefore cannot be deserialized into

writeExternal

public void writeExternal(DataOutput out)
                   throws IOException
Save the contents of this object by storing the object's state into the passed DataOutput object.

Specified by:
writeExternal in interface ExternalizableLite
Parameters:
out - the DataOutput stream to write the state of this object to
Throws:
IOException - if an I/O exception occurs

readExternal

public void readExternal(PofReader in)
                  throws IOException
Restore the contents of a user type instance by reading its state using the specified PofReader object.

Specified by:
readExternal in interface PortableObject
Parameters:
in - the PofReader from which to read the object's state
Throws:
IOException - if an I/O error occurs

writeExternal

public void writeExternal(PofWriter out)
                   throws IOException
Save the contents of a POF user type instance by writing its state using the specified PofWriter object.

Specified by:
writeExternal in interface PortableObject
Parameters:
out - the PofWriter to which to write the object's state
Throws:
IOException - if an I/O error occurs

CoherenceTM v3.3
Copyright© 2000-2007 by Oracle Corporation