|
Oracle® Fusion Middleware Java API Reference for Oracle Coherence 12c (12.1.3.0.0) E47890-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.LiteMap
public class LiteMap
An implementation of java.util.Map that is optimal (in terms of both size and speed) for very small sets of data but still works excellently with large sets of data. This implementation is not thread-safe.
The LiteMap implementation switches at runtime between several different sub-implementations for storing the Map of objects, described here:
The LiteMap implementation supports the null key value.
| Nested Class Summary | |
|---|---|
static class |
LiteMap.EntryIteratorA simple Iterator for LiteMap Entry objects. |
protected class |
LiteMap.EntrySetA Set of entries backed by this Map. |
| Nested classes/interfaces inherited from class java.util.AbstractMap |
|---|
java.util.AbstractMap.SimpleEntry, java.util.AbstractMap.SimpleImmutableEntry |
| Nested classes/interfaces inherited from interface java.util.Map |
|---|
java.util.Map.Entry |
| Constructor Summary | |
|---|---|
LiteMap()Construct a LiteMap. |
|
LiteMap(java.util.Map map)Construct a LiteMap with the same mappings as the given map. |
|
| Method Summary | |
|---|---|
protected void |
checkShrinkFromOther()After a mutation operation has reduced the size of an underlying Map, check if the delegation model should be replaced with a more size- efficient storage approach, and switch accordingly. |
void |
clear()Clear all key/value mappings. |
java.lang.Object |
clone()Create a clone of the ImmutableArrayList. |
boolean |
containsKey(java.lang.Object oKey)Returns true if this map contains a mapping for the specified key. |
java.util.Set |
entrySet()Returns a set view of the mappings contained in this map. |
java.lang.Object |
get(java.lang.Object oKey)Returns the value to which this map maps the specified key. |
protected java.util.Map.Entry |
instantiateEntry(java.lang.Object key, java.lang.Object value)(Factory pattern) Instantiate a Map Entry. |
protected java.util.Set |
instantiateEntrySet()(Factory pattern) Instantiate an Entry Set. |
protected java.util.Map |
instantiateMap()(Factory pattern) Instantiate a Map object to store entries in once the "lite" threshold has been exceeded. |
boolean |
isEmpty()Returns true if this map contains no key-value mappings. |
java.lang.Object |
put(java.lang.Object oKey, java.lang.Object oValue)Associates the specified value with the specified key in this map. |
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(java.io.ObjectInput in)Initialize this object from the data in the passed ObjectInput stream. |
java.lang.Object |
remove(java.lang.Object oKey)Removes the mapping for this key from this map if present. |
int |
size()Returns the number of key-value mappings 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(java.io.ObjectOutput out)Write this object's data to the passed ObjectOutput stream. |
| Methods inherited from class java.util.AbstractMap |
|---|
containsValue, equals, hashCode, keySet, putAll, toString, values |
| Constructor Detail |
|---|
public LiteMap()
public LiteMap(java.util.Map map)
map - the map whose mappings are to be placed in this map.| Method Detail |
|---|
public boolean isEmpty()
isEmpty in interface java.util.MapisEmpty in class java.util.AbstractMappublic int size()
size in interface java.util.Mapsize in class java.util.AbstractMappublic boolean containsKey(java.lang.Object oKey)
containsKey in interface java.util.MapcontainsKey in class java.util.AbstractMappublic java.lang.Object get(java.lang.Object oKey)
get in interface java.util.Mapget in class java.util.AbstractMapoKey - the key object
public java.lang.Object put(java.lang.Object oKey,
java.lang.Object oValue)
put in interface java.util.Mapput in class java.util.AbstractMapoKey - key with which the specified value is to be associatedoValue - value to be associated with the specified keypublic java.lang.Object remove(java.lang.Object oKey)
remove in interface java.util.Mapremove in class java.util.AbstractMapoKey - key whose mapping is to be removed from the mappublic void clear()
clear in interface java.util.Mapclear in class java.util.AbstractMappublic java.lang.Object clone()
clone in class java.util.AbstractMappublic java.util.Set entrySet()
Map Entry. The set is backed by the map, so changes to the map are reflected in the set, and vice-versa. If the map is modified while an iteration over the set is in progress (except by the iterator's own remove operation, or by the setValue operation on a map entry returned by the iterator) the results of the iteration are undefined. The set supports element removal, which removes the corresponding mapping from the map, via the Iterator.remove, Set.remove, removeAll, retainAll and clear operations. It is not expected to support the add or addAll operations.entrySet in interface java.util.MapentrySet in class java.util.AbstractMap
public void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
readExternal in interface java.io.Externalizablein - the stream to read data from in order to restore the objectjava.io.IOException - if an I/O exception occursjava.lang.ClassNotFoundException
public void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
writeExternal in interface java.io.Externalizableout - the stream to write the object tojava.io.IOException - if an I/O exception occurs
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
protected java.util.Map.Entry instantiateEntry(java.lang.Object key,
java.lang.Object value)
protected java.util.Set instantiateEntrySet()
protected java.util.Map instantiateMap()
protected void checkShrinkFromOther()
|
Oracle® Fusion Middleware Java API Reference for Oracle Coherence 12c (12.1.3.0.0) E47890-01 |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||