Package com.tangosol.run.xml
Class SimpleElement.AttributeMap
- java.lang.Object
-
- java.util.AbstractMap
-
- com.tangosol.run.xml.SimpleElement.AttributeMap
-
- All Implemented Interfaces:
ExternalizableLite
,Serializable
,Cloneable
,Map
- Enclosing class:
- SimpleElement
public class SimpleElement.AttributeMap extends AbstractMap implements Cloneable, Serializable, ExternalizableLite
A Map implementation using a list that can be a read-only map that supports only Strings for keys and XmlValue for values.As of Coherence 3.2, this is an inlined version of the old ListMap.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
SimpleElement.AttributeMap.Entry
An implementation of Entry that supports keeping them in a list.protected class
SimpleElement.AttributeMap.EntrySet
A Set implementation to hold Entry objects.-
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 AttributeMap()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
Object
clone()
boolean
containsKey(Object key)
Set
entrySet()
boolean
equals(Object o)
protected SimpleElement.AttributeMap.Entry
findEntry(Object oKey)
Find an entry with the specified key.Object
get(Object 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)
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()
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
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
-
-
-
Method Detail
-
size
public int size()
- Specified by:
size
in interfaceMap
- Overrides:
size
in classAbstractMap
-
containsKey
public boolean containsKey(Object key)
- Specified by:
containsKey
in interfaceMap
- Overrides:
containsKey
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
-
remove
public Object remove(Object key)
- Specified by:
remove
in interfaceMap
- Overrides:
remove
in classAbstractMap
-
clear
public void clear()
- Specified by:
clear
in interfaceMap
- Overrides:
clear
in classAbstractMap
-
entrySet
public Set entrySet()
- Specified by:
entrySet
in interfaceMap
- Specified by:
entrySet
in classAbstractMap
-
equals
public boolean equals(Object o)
- Specified by:
equals
in interfaceMap
- Overrides:
equals
in classAbstractMap
-
clone
public Object clone()
- Overrides:
clone
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
-
instantiateEntry
protected SimpleElement.AttributeMap.Entry instantiateEntry(Object oKey, Object oVal)
Instantiate an Entry instance. This method permits inheriting classes to easily override the implementation of Entity.- Parameters:
oKey
- the keyoVal
- the value- Returns:
- the instantiated Entry
-
findEntry
protected SimpleElement.AttributeMap.Entry findEntry(Object oKey)
Find an entry with the specified key.- Parameters:
oKey
- the key to search for- Returns:
- the entry with the specified key or null if the key could not be found
-
getFirstEntry
protected SimpleElement.AttributeMap.Entry getFirstEntry()
Return the first entry in the list..- Returns:
- the first entry in the list
-
instantiateEntrySet
protected Set instantiateEntrySet()
Instantiate an Entry Set. This method permits inheriting classes to easily override the implementation of the Entity Set.- Returns:
- the instantiated set of Entry's
-
-