|
Oracle® Coherence Java API Reference Release 3.7.1.0 E22843-01 |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object
java.util.AbstractMap
com.tangosol.util.NullImplementation.NullMap
public static class NullImplementation.NullMap
A Map that contains nothing and does nothing.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface java.util.Map |
|---|
java.util.Map.Entry |
| Field Summary | |
|---|---|
static java.util.Map |
INSTANCESince 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(java.lang.Object key)Returns true if this map contains a mapping for the specified key. |
boolean |
containsValue(java.lang.Object value)Returns true if this map maps one or more keys to this value. |
java.util.Set |
entrySet()Returns a set view of the mappings contained in this map. |
boolean |
equals(java.lang.Object o)Compares the specified object with this map for equality. |
java.lang.Object |
get(java.lang.Object key)Returns the value to which this map maps the specified key. |
int |
hashCode()Returns the hash code value for this map. |
java.util.Set |
keySet()Returns a Set view of the keys contained in this map. |
java.lang.Object |
put(java.lang.Object key, java.lang.Object value)Associates the specified value with the specified key in this map (optional operation). |
void |
putAll(java.util.Map map)Copies all of the mappings from the specified map to this map (optional operation). |
void |
readExternal(java.io.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. |
java.lang.Object |
remove(java.lang.Object key)Removes the mapping for this key from this map if present (optional operation). |
int |
size()Returns the number of key-value mappings in this map. |
java.util.Collection |
values()Returns a collection view of the values contained in this map. |
void |
writeExternal(java.io.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 |
|---|
public static final java.util.Map INSTANCE
| Constructor Detail |
|---|
public NullImplementation.NullMap()
| Method Detail |
|---|
public int size()
java.util.AbstractMapThis implementation returns entrySet().size().
size in interface java.util.Mapsize in class java.util.AbstractMappublic java.lang.Object get(java.lang.Object key)
java.util.AbstractMapThis implementation iterates over entrySet() searching for an entry with the specified key. If such an entry is found, the entry's value is returned. If the iteration terminates without finding such an entry, null is returned. Note that this implementation requires linear time in the size of the map; many implementations will override this method.
get in interface java.util.Mapget in class java.util.AbstractMapkey - key whose associated value is to be returned.AbstractMap.containsKey(Object)
public java.lang.Object put(java.lang.Object key,
java.lang.Object value)
java.util.AbstractMapThis implementation always throws an UnsupportedOperationException.
put in interface java.util.Mapput in class java.util.AbstractMapkey - key with which the specified value is to be associated.value - value to be associated with the specified key.public void putAll(java.util.Map map)
java.util.AbstractMapThis implementation iterates over the specified map's entrySet() collection, and calls this map's put operation once for each entry returned by the iteration.
Note that this implementation throws an UnsupportedOperationException if this map does not support the put operation and the specified map is nonempty.
putAll in interface java.util.MapputAll in class java.util.AbstractMapmap - mappings to be stored in this map.public java.lang.Object remove(java.lang.Object key)
java.util.AbstractMapThis implementation iterates over entrySet() searching for an entry with the specified key. If such an entry is found, its value is obtained with its getValue operation, the entry is removed from the Collection (and the backing map) with the iterator's remove operation, and the saved value is returned. If the iteration terminates without finding such an entry, null is returned. Note that this implementation requires linear time in the size of the map; many implementations will override this method.
Note that this implementation throws an UnsupportedOperationException if the entrySet iterator does not support the remove method and this map contains a mapping for the specified key.
remove in interface java.util.Mapremove in class java.util.AbstractMapkey - key whose mapping is to be removed from the map.public boolean containsKey(java.lang.Object key)
java.util.AbstractMapThis implementation iterates over entrySet() searching for an entry with the specified key. If such an entry is found, true is returned. If the iteration terminates without finding such an entry, false is returned. Note that this implementation requires linear time in the size of the map; many implementations will override this method.
containsKey in interface java.util.MapcontainsKey in class java.util.AbstractMapkey - key whose presence in this map is to be tested.public boolean containsValue(java.lang.Object value)
java.util.AbstractMapThis implementation iterates over entrySet() searching for an entry with the specified value. If such an entry is found, true is returned. If the iteration terminates without finding such an entry, false is returned. Note that this implementation requires linear time in the size of the map.
containsValue in interface java.util.MapcontainsValue in class java.util.AbstractMapvalue - value whose presence in this map is to be tested.public java.util.Set entrySet()
java.util.AbstractMapentrySet in interface java.util.MapentrySet in class java.util.AbstractMappublic java.util.Set keySet()
java.util.AbstractMapThis implementation returns a Set that subclasses AbstractSet. The subclass's iterator method returns a "wrapper object" over this map's entrySet() iterator. The size method delegates to this map's size method and the contains method delegates to this map's containsKey method.
The Set is created the first time this method is called, and returned in response to all subsequent calls. No synchronization is performed, so there is a slight chance that multiple calls to this method will not all return the same Set.
keySet in interface java.util.MapkeySet in class java.util.AbstractMappublic java.util.Collection values()
java.util.AbstractMapThis implementation returns a collection that subclasses abstract collection. The subclass's iterator method returns a "wrapper object" over this map's entrySet() iterator. The size method delegates to this map's size method and the contains method delegates to this map's containsValue method.
The collection is created the first time this method is called, and returned in response to all subsequent calls. No synchronization is performed, so there is a slight chance that multiple calls to this method will not all return the same Collection.
values in interface java.util.Mapvalues in class java.util.AbstractMappublic boolean equals(java.lang.Object o)
java.util.AbstractMapThis implementation first checks if the specified object is this map; if so it returns true. Then, it checks if the specified object is a map whose size is identical to the size of this set; if not, it returns false. If so, it iterates over this map's entrySet collection, and checks that the specified map contains each mapping that this map contains. If the specified map fails to contain such a mapping, false is returned. If the iteration completes, true is returned.
equals in interface java.util.Mapequals in class java.util.AbstractMapo - object to be compared for equality with this map.public int hashCode()
java.util.AbstractMapThis implementation iterates over entrySet(), calling hashCode on each element (entry) in the Collection, and adding up the results.
hashCode in interface java.util.MaphashCode in class java.util.AbstractMapMap.Entry.hashCode(), Object.hashCode(), Object.equals(Object), Set.equals(Object)
public void readExternal(java.io.DataInput in)
throws java.io.IOException
readExternal in interface ExternalizableLitein - the DataInput stream to read data from in order to restore the state of this objectjava.io.IOException - if an I/O exception occursjava.io.NotActiveException - if the object is not in its initial state, and therefore cannot be deserialized into
public void writeExternal(java.io.DataOutput out)
throws java.io.IOException
writeExternal in interface ExternalizableLiteout - the DataOutput stream to write the state of this object tojava.io.IOException - if an I/O exception occurs
public void readExternal(PofReader in)
throws java.io.IOException
readExternal in interface PortableObjectin - the PofReader from which to read the object's statejava.io.IOException - if an I/O error occurs
public void writeExternal(PofWriter out)
throws java.io.IOException
writeExternal in interface PortableObjectout - the PofWriter to which to write the object's statejava.io.IOException - if an I/O error occurs
|
Oracle® Coherence Java API Reference Release 3.7.1.0 E22843-01 |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||