|
Oracle® Coherence Java API Reference Release 3.6.0.0 E15725-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.run.xml.SimpleElement.AttributeMap
public class SimpleElement.AttributeMap
A Map implementation using a list that can be a read-only map that supports only Strings for keys and XmlValue for values. <p/> As of Coherence 3.2, this is an inlined version of the old ListMap.
| Nested Class Summary | |
|---|---|
class |
SimpleElement.AttributeMap.EntryAn implementation of Entry that supports keeping them in a list. |
protected class |
SimpleElement.AttributeMap.EntrySetA Set implementation to hold Entry objects. |
| Constructor Summary | |
|---|---|
SimpleElement.AttributeMap() |
|
| Method Summary | |
|---|---|
void |
clear()Removes all mappings from this map (optional operation). |
Object |
clone()Returns a shallow copy of this AbstractMap instance: the keys and values themselves are not cloned. |
boolean |
containsKey(Object key)Returns true if this map contains a mapping for the specified key. |
Set |
entrySet()Returns a set view of the mappings contained in this map. |
boolean |
equals(Object o)Compares the specified object with this map for equality. |
protected SimpleElement.AttributeMap.Entry |
findEntry(Object oKey)Find an entry with the specified key. |
Object |
get(Object key)Returns the value to which this map maps the specified key. |
protected SimpleElement.AttributeMap.Entry |
getFirstEntry()Return the first entry in the list.. |
protected SimpleElement.AttributeMap.Entry |
instantiateEntry(Object oKey, Object oVal)Instantiate an Entry instance. |
protected Set |
instantiateEntrySet()Instantiate an Entry Set. |
Object |
put(Object key, Object value)Associates the specified value with the specified key in this map (optional operation). |
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)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. |
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 |
|---|
containsValue, hashCode, isEmpty, keySet, putAll, toString, values |
| Constructor Detail |
|---|
public SimpleElement.AttributeMap()
| Method Detail |
|---|
public int size()
java.util.AbstractMapThis implementation returns entrySet().size().
size in interface Mapsize in class AbstractMappublic boolean containsKey(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 MapcontainsKey in class AbstractMapkey - key whose presence in this map is to be tested.public Object get(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 Mapget in class AbstractMapkey - key whose associated value is to be returned.AbstractMap.containsKey(Object)
public Object put(Object key,
Object value)
java.util.AbstractMapThis implementation always throws an UnsupportedOperationException.
put in interface Mapput in class AbstractMapkey - key with which the specified value is to be associated.value - value to be associated with the specified key.public Object remove(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 Mapremove in class AbstractMapkey - key whose mapping is to be removed from the map.public void clear()
java.util.AbstractMapThis implementation calls entrySet().clear(). Note that this implementation throws an UnsupportedOperationException if the entrySet does not support the clear operation.
clear in interface Mapclear in class AbstractMappublic Set entrySet()
java.util.AbstractMapentrySet in interface MapentrySet in class AbstractMappublic boolean equals(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 Mapequals in class AbstractMapo - object to be compared for equality with this map.public Object clone()
java.util.AbstractMapclone in class AbstractMap
public void readExternal(DataInput in)
throws IOException
readExternal in interface ExternalizableLitein - the DataInput stream to read data from in order to restore the state of this objectIOException - if an I/O exception occursNotActiveException - if the object is not in its initial state, and therefore cannot be deserialized into
public void writeExternal(DataOutput out)
throws IOException
writeExternal in interface ExternalizableLiteout - the DataOutput stream to write the state of this object toIOException - if an I/O exception occurs
protected SimpleElement.AttributeMap.Entry instantiateEntry(Object oKey,
Object oVal)
protected SimpleElement.AttributeMap.Entry findEntry(Object oKey)
oKey - the key to search forprotected SimpleElement.AttributeMap.Entry getFirstEntry()
protected Set instantiateEntrySet()
|
Oracle® Coherence Java API Reference Release 3.6.0.0 E15725-01 |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||