|
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.AbstractCollection
java.util.AbstractSet
com.tangosol.util.MapSet
public class MapSet
An ExternalizableLite implementation of java.util.Set that uses an underlying Map object to store its data in, just as the Java HashSet implementation uses an underlying HashMap for its element storage.
| Field Summary | |
|---|---|
protected java.util.Map |
m_mapThe underlying Map. |
protected static java.lang.Object |
NO_VALUEA no-value object. |
| Constructor Summary | |
|---|---|
MapSet()Default constructor. |
|
MapSet(java.util.Map map)Construct a MapSet that uses the given Map for its underlying storage. |
|
| Method Summary | |
|---|---|
boolean |
add(java.lang.Object o)Ensures that this Set contains the specified element. |
boolean |
addAll(java.util.Collection coll)Adds all of the elements in the specified Collection to this Set if they're not already present. |
void |
clear()Removes all of the elements from this Set. |
java.lang.Object |
clone()Create a clone of this MapSet. |
boolean |
contains(java.lang.Object o)Returns true if this Set contains the specified element. |
boolean |
containsAll(java.util.Collection coll)Returns true if this Set contains all of the elements in the specified Collection. |
java.util.Map |
getMap()Obtain the underlying Map for purposes of synchronization or read-only access; the caller must never directly modify the returned Map. |
protected java.util.Map |
instantiateMap()Factory pattern: Provide an underlying Map for this Set implementation to store its contents in. |
java.util.Iterator |
iterator()Returns an iterator over the elements in this Set. |
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 contents of the passed object stream. |
boolean |
remove(java.lang.Object o)Removes the specified element from this Set if it is present. |
boolean |
removeAll(java.util.Collection coll)Removes from this Set all of its elements that are contained in the specified Collection. |
boolean |
retainAll(java.util.Collection coll)Retains only the elements in this Set that are contained in the specified Collection. |
int |
size()Returns the number of elements in this Set. |
java.lang.Object[] |
toArray()Returns an array containing all of the elements in this Set. |
java.lang.Object[] |
toArray(java.lang.Object[] ao)Returns an array containing all of the elements in this set whose runtime type is that of the specified array. |
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 the contents of this object into the passed object stream. |
| Methods inherited from class java.util.AbstractSet |
|---|
equals, hashCode |
| Methods inherited from class java.util.AbstractCollection |
|---|
isEmpty, toString |
| Methods inherited from interface java.util.Set |
|---|
isEmpty |
| Field Detail |
|---|
protected static final java.lang.Object NO_VALUE
protected transient java.util.Map m_map
| Constructor Detail |
|---|
public MapSet()
MapSet(Map) constructor. To change the default Map implementation, sub-class the MapSet and override the instantiateMap() method.public MapSet(java.util.Map map)
map - the underlying Map object| Method Detail |
|---|
public int size()
size in interface java.util.Collectionsize in interface java.util.Setsize in class java.util.AbstractCollectionpublic boolean contains(java.lang.Object o)
contains in interface java.util.Collectioncontains in interface java.util.Setcontains in class java.util.AbstractCollectionpublic java.util.Iterator iterator()
iterator in interface java.lang.Iterableiterator in interface java.util.Collectioniterator in interface java.util.Setiterator in class java.util.AbstractCollectionpublic java.lang.Object[] toArray()
Collection.toArray() method.toArray in interface java.util.CollectiontoArray in interface java.util.SettoArray in class java.util.AbstractCollectionpublic java.lang.Object[] toArray(java.lang.Object[] ao)
Collection.toArray(Object[]) method.toArray in interface java.util.CollectiontoArray in interface java.util.SettoArray in class java.util.AbstractCollectionao - the array into which the elements of this Set are to be stored, if it is big enough; otherwise, a new array of the same runtime type is allocated for this purposejava.lang.ArrayStoreException - the runtime type of a is not a supertype of the runtime type of every element in this Setpublic boolean add(java.lang.Object o)
add in interface java.util.Collectionadd in interface java.util.Setadd in class java.util.AbstractCollectiono - element to be added to this Setpublic boolean remove(java.lang.Object o)
remove in interface java.util.Collectionremove in interface java.util.Setremove in class java.util.AbstractCollectiono - object to be removed from this Set, if presentpublic boolean containsAll(java.util.Collection coll)
containsAll in interface java.util.CollectioncontainsAll in interface java.util.SetcontainsAll in class java.util.AbstractCollectioncoll - Collection to be checked for containment in this Setcontains(Object)public boolean addAll(java.util.Collection coll)
addAll in interface java.util.CollectionaddAll in interface java.util.SetaddAll in class java.util.AbstractCollectioncoll - Collection whose elements are to be added to this Setadd(Object)public boolean retainAll(java.util.Collection coll)
retainAll in interface java.util.CollectionretainAll in interface java.util.SetretainAll in class java.util.AbstractCollectioncoll - Collection that defines which elements this Set will retainpublic boolean removeAll(java.util.Collection coll)
removeAll in interface java.util.CollectionremoveAll in interface java.util.SetremoveAll in class java.util.AbstractSetcoll - Collection that defines which elements will be removed from this Setremove(Object)public void clear()
clear in interface java.util.Collectionclear in interface java.util.Setclear in class java.util.AbstractCollectionpublic java.util.Map getMap()
public java.lang.Object clone()
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 occursprotected java.util.Map instantiateMap()
|
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 | |||||||