Package com.tangosol.util
Class NullImplementation.NullMap
- java.lang.Object
-
- java.util.AbstractMap
-
- 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.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object,V extends Object>
-
-
Constructor Summary
Constructors Constructor Description NullMap()
Default constructor (for ExternalizableLite and PortableObject).
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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(PofReader in)
Restore the contents of a user type instance by reading its state using the specified PofReader object.void
readExternal(DataInput in)
Restore the contents of this object by loading the object's state from the passed DataInput object.Object
remove(Object key)
int
size()
Collection
values()
void
writeExternal(PofWriter out)
Save the contents of a POF user type instance by writing its state using the specified PofWriter object.void
writeExternal(DataOutput out)
Save the contents of this object by storing the object's state into the passed DataOutput object.-
Methods inherited from class java.util.AbstractMap
clear, clone, isEmpty, toString
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Map
clear, compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, isEmpty, merge, putIfAbsent, remove, replace, replace, replaceAll
-
-
-
-
Field Detail
-
INSTANCE
public static final Map INSTANCE
Since the Map contains no information, only one ever has to exist.
-
-
Method Detail
-
size
public int size()
- Specified by:
size
in interfaceMap
- Overrides:
size
in classAbstractMap
-
get
public Object get(Object key)
- Specified by:
get
in interfaceMap
- Overrides:
get
in classAbstractMap
-
put
public Object put(Object key, Object value)
- Specified by:
put
in interfaceMap
- Overrides:
put
in classAbstractMap
-
putAll
public void putAll(Map map)
- Specified by:
putAll
in interfaceMap
- Overrides:
putAll
in classAbstractMap
-
remove
public Object remove(Object key)
- Specified by:
remove
in interfaceMap
- Overrides:
remove
in classAbstractMap
-
containsKey
public boolean containsKey(Object key)
- Specified by:
containsKey
in interfaceMap
- Overrides:
containsKey
in classAbstractMap
-
containsValue
public boolean containsValue(Object value)
- Specified by:
containsValue
in interfaceMap
- Overrides:
containsValue
in classAbstractMap
-
entrySet
public Set entrySet()
- Specified by:
entrySet
in interfaceMap
- Specified by:
entrySet
in classAbstractMap
-
keySet
public Set keySet()
- Specified by:
keySet
in interfaceMap
- Overrides:
keySet
in classAbstractMap
-
values
public Collection values()
- Specified by:
values
in interfaceMap
- Overrides:
values
in classAbstractMap
-
equals
public boolean equals(Object o)
- Specified by:
equals
in interfaceMap
- Overrides:
equals
in classAbstractMap
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfaceMap
- Overrides:
hashCode
in classAbstractMap
-
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 interfaceExternalizableLite
- 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 occursNotActiveException
- 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 interfaceExternalizableLite
- 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 interfacePortableObject
- 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 interfacePortableObject
- Parameters:
out
- the PofWriter to which to write the object's state- Throws:
IOException
- if an I/O error occurs
-
-