API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.util. EnumSet View Source
Author(s)
Josh Bloch
Since
1.5
Version
1.15, 07/10/06
Serial
exclude
Hierarchy
 Object
      AbstractCollection
          AbstractSet
              EnumSet
Implements
 Cloneable
 Serializable
Subclasses
Description
publicabstract abstract class EnumSet
  A specialized Set implementation for use with enum types.
See also:    EnumMap
Constructors
pack-private EnumSet (Class< E> elementType, Enum universe)
Methods
Hide/Show inherited methods
public boolean add ( E e) [Inherited From AbstractCollection]
  Ensures that this collection contains the specified element (optional operation).
pack-privateabstract void addAll ()
Adds all of the elements from the appropriate enum type to this enum set, which is empty prior to the call.
public boolean addAll (Collection<Object> c) [Inherited From AbstractCollection]
  Adds all of the elements in the specified collection to this collection (optional operation).
pack-privateabstract void addRange ( E from, E to)
Adds the specified range to this enum set, which is empty prior to the call.
publicstatic EnumSet< E> allOf (Class< E> elementType)
  Creates an enum set containing all of the elements in the specified element type.
public void clear () [Inherited From AbstractCollection]
  Removes all of the elements from this collection (optional operation).
public EnumSet< E> clone ()
  Returns a copy of this set.
pack-privateabstract void complement ()
Complements the contents of this enum set.
publicstatic EnumSet< E> complementOf (EnumSet< E> s)
  Creates an enum set with the same element type as the specified enum set, initially containing all the elements of this type that are not contained in the specified set.
public boolean contains (Object o) [Inherited From AbstractCollection]
  Returns true if this collection contains the specified element.
public boolean containsAll (Collection<Object> c) [Inherited From AbstractCollection]
  Returns true if this collection contains all of the elements in the specified collection.
publicstatic EnumSet< E> copyOf (Collection< E> c)
  Creates an enum set initialized from the specified collection.
publicstatic EnumSet< E> copyOf (EnumSet< E> s)
  Creates an enum set with the same element type as the specified enum set, initially containing the same elements (if any).
public boolean equals (Object o) [Inherited From AbstractSet]
  Compares the specified object with this set for equality.
public int hashCode () [Inherited From AbstractSet]
  Returns the hash code value for this set.
public boolean isEmpty () [Inherited From AbstractCollection]
  Returns true if this collection contains no elements.
publicabstract Iterator< E> iterator () [Inherited From AbstractCollection]
  Returns an iterator over the elements contained in this collection.
publicstatic EnumSet< E> noneOf (Class< E> elementType)
  Creates an empty enum set with the specified element type.
publicstatic EnumSet< E> of ( E e)
  Creates an enum set initially containing the specified element.
publicstatic EnumSet< E> of ( E first, E rest)
  Creates an enum set initially containing the specified elements.
publicstatic EnumSet< E> of ( E e1, E e2)
  Creates an enum set initially containing the specified elements.
publicstatic EnumSet< E> of ( E e1, E e2, E e3)
  Creates an enum set initially containing the specified elements.
publicstatic EnumSet< E> of ( E e1, E e2, E e3, E e4)
  Creates an enum set initially containing the specified elements.
publicstatic EnumSet< E> of ( E e1, E e2, E e3, E e4, E e5)
  Creates an enum set initially containing the specified elements.
publicstatic EnumSet< E> range ( E from, E to)
  Creates an enum set initially containing all of the elements in the range defined by the two specified endpoints.
public boolean remove (Object o) [Inherited From AbstractCollection]
  Removes a single instance of the specified element from this collection, if it is present (optional operation).
public boolean removeAll (Collection<Object> c) [Inherited From AbstractSet]
  Removes from this set all of its elements that are contained in the specified collection (optional operation).
public boolean retainAll (Collection<Object> c) [Inherited From AbstractCollection]
  Retains only the elements in this collection that are contained in the specified collection (optional operation).
publicabstract int size () [Inherited From AbstractCollection]
public Object toArray () [Inherited From AbstractCollection]
  Returns an array containing all of the elements in this collection.
public T toArray ( T a) [Inherited From AbstractCollection]
  Returns an array containing all of the elements in this collection; the runtime type of the returned array is that of the specified array.
public String toString () [Inherited From AbstractCollection]
  Returns a string representation of this collection.
pack-privatefinal void typeCheck ( E e)
Throws an exception if e is not of the correct type for this enum set.
pack-private Object writeReplace ()
Fields
Hide/Show inherited fields
pack-privatefinal Class< E> elementType
The class of all the elements of this set.
pack-privatefinal Enum universe
  All of the values comprising T.
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar