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:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,
V>, AbstractMap.SimpleImmutableEntry<K, V> -
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
containsKey
(Object key) boolean
containsValue
(Object value) entrySet()
boolean
int
hashCode()
keySet()
void
void
Restore the contents of a user type instance by reading its state using the specified PofReader object.void
Restore the contents of this object by loading the object's state from the passed DataInput object.int
size()
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 Details
-
INSTANCE
Since the Map contains no information, only one ever has to exist.
-
-
Constructor Details
-
NullMap
public NullMap()Default constructor (for ExternalizableLite and PortableObject).
-
-
Method Details
-
size
public int size()- Specified by:
size
in interfaceMap
- Overrides:
size
in classAbstractMap
-
get
- Specified by:
get
in interfaceMap
- Overrides:
get
in classAbstractMap
-
put
- Specified by:
put
in interfaceMap
- Overrides:
put
in classAbstractMap
-
putAll
- Specified by:
putAll
in interfaceMap
- Overrides:
putAll
in classAbstractMap
-
remove
- Specified by:
remove
in interfaceMap
- Overrides:
remove
in classAbstractMap
-
containsKey
- Specified by:
containsKey
in interfaceMap
- Overrides:
containsKey
in classAbstractMap
-
containsValue
- Specified by:
containsValue
in interfaceMap
- Overrides:
containsValue
in classAbstractMap
-
entrySet
- Specified by:
entrySet
in interfaceMap
- Specified by:
entrySet
in classAbstractMap
-
keySet
- Specified by:
keySet
in interfaceMap
- Overrides:
keySet
in classAbstractMap
-
values
- Specified by:
values
in interfaceMap
- Overrides:
values
in classAbstractMap
-
equals
- Specified by:
equals
in interfaceMap
- Overrides:
equals
in classAbstractMap
-
hashCode
public int hashCode()- Specified by:
hashCode
in interfaceMap
- Overrides:
hashCode
in classAbstractMap
-
readExternal
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 occurs
-
writeExternal
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
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
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
-