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 booleancontainsKey(Object key)booleancontainsValue(Object value)SetentrySet()booleanequals(Object o)Objectget(Object key)inthashCode()SetkeySet()Objectput(Object key, Object value)voidputAll(Map map)voidreadExternal(PofReader in)Restore the contents of a user type instance by reading its state using the specified PofReader object.voidreadExternal(DataInput in)Restore the contents of this object by loading the object's state from the passed DataInput object.Objectremove(Object key)intsize()Collectionvalues()voidwriteExternal(PofWriter out)Save the contents of a POF user type instance by writing its state using the specified PofWriter object.voidwriteExternal(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:
sizein interfaceMap- Overrides:
sizein classAbstractMap
-
get
public Object get(Object key)
- Specified by:
getin interfaceMap- Overrides:
getin classAbstractMap
-
put
public Object put(Object key, Object value)
- Specified by:
putin interfaceMap- Overrides:
putin classAbstractMap
-
putAll
public void putAll(Map map)
- Specified by:
putAllin interfaceMap- Overrides:
putAllin classAbstractMap
-
remove
public Object remove(Object key)
- Specified by:
removein interfaceMap- Overrides:
removein classAbstractMap
-
containsKey
public boolean containsKey(Object key)
- Specified by:
containsKeyin interfaceMap- Overrides:
containsKeyin classAbstractMap
-
containsValue
public boolean containsValue(Object value)
- Specified by:
containsValuein interfaceMap- Overrides:
containsValuein classAbstractMap
-
entrySet
public Set entrySet()
- Specified by:
entrySetin interfaceMap- Specified by:
entrySetin classAbstractMap
-
keySet
public Set keySet()
- Specified by:
keySetin interfaceMap- Overrides:
keySetin classAbstractMap
-
values
public Collection values()
- Specified by:
valuesin interfaceMap- Overrides:
valuesin classAbstractMap
-
equals
public boolean equals(Object o)
- Specified by:
equalsin interfaceMap- Overrides:
equalsin classAbstractMap
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfaceMap- Overrides:
hashCodein 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:
readExternalin 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:
writeExternalin 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:
readExternalin 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:
writeExternalin interfacePortableObject- Parameters:
out- the PofWriter to which to write the object's state- Throws:
IOException- if an I/O error occurs
-
-