|
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.AbstractCollection
java.util.AbstractSet
com.tangosol.util.NullImplementation.NullSet
public static class NullImplementation.NullSet
An immutable set which contains nothing.
| Field Summary | |
|---|---|
static Set |
INSTANCESince the set contains no information, only one ever has to exist. |
| Constructor Summary | |
|---|---|
NullImplementation.NullSet()Default constructor (for ExternalizableLite and PortableObject). |
|
| Method Summary | |
|---|---|
boolean |
add(Object o)Ensures that this Collection contains the specified element. |
void |
clear()Removes all of the elements from this Collection. |
boolean |
contains(Object o)Returns true if this Collection contains the specified element. |
boolean |
equals(Object o)Compares the specified object with this set for equality. |
int |
hashCode()Returns the hash code value for this set. |
Iterator |
iterator()Returns an Iterator over the elements contained in this Collection. |
void |
readExternal(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. |
boolean |
remove(Object o)Removes a single instance of the specified element from this Collection, if it is present (optional operation). |
int |
size()Returns the number of elements in this Collection. |
Object[] |
toArray()Returns an array containing all of the elements in this Set. |
void |
writeExternal(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.AbstractSet |
|---|
removeAll |
| Methods inherited from class java.util.AbstractCollection |
|---|
addAll, containsAll, isEmpty, retainAll, toArray, toString |
| Methods inherited from interface java.util.Set |
|---|
addAll, containsAll, isEmpty, retainAll, toArray |
| Field Detail |
|---|
public static final Set INSTANCE
| Constructor Detail |
|---|
public NullImplementation.NullSet()
| Method Detail |
|---|
public Object[] toArray()
toArray in interface CollectiontoArray in interface SettoArray in class AbstractCollectionpublic Iterator iterator()
iterator in interface Iterableiterator in interface Collectioniterator in interface Setiterator in class AbstractCollectionpublic int size()
size in interface Collectionsize in interface Setsize in class AbstractCollectionpublic boolean contains(Object o)
e such that (o==null ? e==null : o.equals(e)).contains in interface Collectioncontains in interface Setcontains in class AbstractCollectiono - the object to search for in the setpublic boolean add(Object o)
add in interface Collectionadd in interface Setadd in class AbstractCollectiono - element whose presence in this Collection is to be ensuredpublic boolean remove(Object o)
e such that (o==null ? e==null : o.equals(e)), if the Collection contains one or more such elements. Returns true if the Collection contained the specified element (or equivalently, if the Collection changed as a result of the call).remove in interface Collectionremove in interface Setremove in class AbstractCollectiono - element to be removed from this Collection, if presentpublic void clear()
clear in interface Collectionclear in interface Setclear in class AbstractCollectionpublic boolean equals(Object o)
java.util.AbstractSetThis implementation first checks if the specified object is this set; if so it returns true. Then, it checks if the specified object is a set whose size is identical to the size of this set; if not, it returns false. If so, it returns containsAll((Collection) o).
equals in interface Collectionequals in interface Setequals in class AbstractSeto - Object to be compared for equality with this set.Object.equals(Object), Set.equals(Object), List.equals(Object)public int hashCode()
java.util.AbstractSetThis implementation enumerates over the set, calling the hashCode method on each element in the collection, and adding up the results.
hashCode in interface CollectionhashCode in interface SethashCode in class AbstractSetObject.hashCode(), Object.equals(Object)
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
public void readExternal(PofReader in)
throws IOException
readExternal in interface PortableObjectin - the PofReader from which to read the object's stateIOException - if an I/O error occurs
public void writeExternal(PofWriter out)
throws IOException
writeExternal in interface PortableObjectout - the PofWriter to which to write the object's stateIOException - if an I/O error occurs
|
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 | |||||||