java.util
Class Collections.EmptySet

java.lang.Object
  extended byjava.util.AbstractCollection
      extended byjava.util.AbstractSet
          extended byjava.util.Collections.EmptySet
All Implemented Interfaces:
Collection, Serializable, Set
Enclosing class:
Collections

private static class Collections.EmptySet
extends AbstractSet
implements Serializable

See Also:
Serialized Form

Field Summary
private static long serialVersionUID
           
 
Constructor Summary
private Collections.EmptySet()
           
 
Method Summary
 boolean contains(Object obj)
          Returns true if this set contains the specified element.
 Iterator iterator()
          Returns an iterator over the elements in this set.
private  Object readResolve()
           
 int size()
          Returns the number of elements in this set (its cardinality).
 
Methods inherited from class java.util.AbstractSet
equals, hashCode, removeAll
 
Methods inherited from class java.util.AbstractCollection
add, addAll, clear, containsAll, isEmpty, remove, retainAll, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Set
add, addAll, clear, containsAll, isEmpty, remove, retainAll, toArray, toArray
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values
Constructor Detail

Collections.EmptySet

private Collections.EmptySet()
Method Detail

iterator

public Iterator iterator()
Description copied from interface: Set
Returns an iterator over the elements in this set. The elements are returned in no particular order (unless this set is an instance of some class that provides a guarantee).

Specified by:
iterator in interface Set
Specified by:
iterator in class AbstractCollection
Returns:
an iterator over the elements contained in this collection.

size

public int size()
Description copied from interface: Set
Returns the number of elements in this set (its cardinality). If this set contains more than Integer.MAX_VALUE elements, returns Integer.MAX_VALUE.

Specified by:
size in interface Set
Specified by:
size in class AbstractCollection
Returns:
the number of elements in this collection.

contains

public boolean contains(Object obj)
Description copied from interface: Set
Returns true if this set contains the specified element. More formally, returns true if and only if this set contains an element e such that (o==null ? e==null : o.equals(e)).

Specified by:
contains in interface Set
Overrides:
contains in class AbstractCollection
Parameters:
obj - object to be checked for containment in this collection.
Returns:
true if this collection contains the specified element.

readResolve

private Object readResolve()