java.util
Class EnumSet<T,extends,Enum,T>
- Cloneable, Collection<E>, Iterable<E>, Serializable, Set<E>
boolean | add(T val)
|
boolean | addAll(T> c)
|
void | clear() - Clear the collection, such that a subsequent call to isEmpty() would
return true.
|
EnumSet | clone()
|
boolean | contains(Object o) - Test whether this collection contains a given object as one of its
elements.
|
boolean | containsAll(Collection> c) - Test whether this collection contains every element in a given collection.
|
static | extends Enum> EnumSet allOf(Class eltType)
|
static | extends Enum> EnumSet complementOf(EnumSet other)
|
static | extends Enum> EnumSet copyOf(Collection other)
|
static | extends Enum> EnumSet copyOf(EnumSet other)
|
static | extends Enum> EnumSet noneOf(Class eltType)
|
static | extends Enum> EnumSet of(T first)
|
static | extends Enum> EnumSet of(T first, T second)
|
static | extends Enum> EnumSet of(T first, T second, T third)
|
static | extends Enum> EnumSet of(T first, T second, T third, T fourth)
|
static | extends Enum> EnumSet of(T first, T second, T third, T fourth, T fifth)
|
static | extends Enum> EnumSet of(T first, T... rest)
|
static | extends Enum> EnumSet range(T from, T to)
|
Iterator | iterator() - Obtain an Iterator over this collection.
|
boolean | remove(Object o) - Remove a single occurrence of an object from this collection.
|
boolean | removeAll(Collection> c) - Remove all elements of a given collection from this collection.
|
boolean | retainAll(Collection> c) - Remove all elements of this collection that are not contained in a given
collection.
|
int | size() - Get the number of elements in this collection.
|
T[] toArray , add , addAll , clear , contains , containsAll , isEmpty , iterator , remove , removeAll , retainAll , size , toArray , toString |
clone , equals , extends Object> getClass , finalize , hashCode , notify , notifyAll , toString , wait , wait , wait |
add
public boolean add(T val)
addAll
public boolean addAll(T> c)
extends Enum> EnumSet allOf
public static extends Enum> EnumSet allOf(Class eltType)
extends Enum> EnumSet complementOf
public static extends Enum> EnumSet complementOf(EnumSet other)
extends Enum> EnumSet copyOf
public static extends Enum> EnumSet copyOf(Collection other)
extends Enum> EnumSet copyOf
public static extends Enum> EnumSet copyOf(EnumSet other)
extends Enum> EnumSet noneOf
public static extends Enum> EnumSet noneOf(Class eltType)
extends Enum> EnumSet of
public static extends Enum> EnumSet of(T first)
extends Enum> EnumSet of
public static extends Enum> EnumSet of(T first,
T second)
extends Enum> EnumSet of
public static extends Enum> EnumSet of(T first,
T second,
T third)
extends Enum> EnumSet of
public static extends Enum> EnumSet of(T first,
T second,
T third,
T fourth)
extends Enum> EnumSet of
public static extends Enum> EnumSet of(T first,
T second,
T third,
T fourth,
T fifth)
extends Enum> EnumSet of
public static extends Enum> EnumSet of(T first,
T... rest)
extends Enum> EnumSet range
public static extends Enum> EnumSet range(T from,
T to)
remove
public boolean remove(Object o)
Remove a single occurrence of an object from this collection. That is,
remove an element e, if one exists, such that o == null ? e == null
: o.equals(e)
.
- remove in interface Set<E>
- remove in interface Collection<E>
- remove in interface AbstractCollection<E>
o
- the object to remove.
- true if the collection changed as a result of this call, that is,
if the collection contained at least one occurrence of o.
removeAll
public boolean removeAll(Collection> c)
Remove all elements of a given collection from this collection. That is,
remove every element e such that c.contains(e).
- removeAll in interface Set<E>
- removeAll in interface Collection<E>
- removeAll in interface AbstractSet<E>
c
- The collection of objects to be removed.
- true if this collection was modified as a result of this call.
retainAll
public boolean retainAll(Collection> c)
Remove all elements of this collection that are not contained in a given
collection. That is, remove every element e such that !c.contains(e).
- retainAll in interface Set<E>
- retainAll in interface Collection<E>
- retainAll in interface AbstractCollection<E>
c
- The collection of objects to be retained.
- true if this collection was modified as a result of this call.
EnumSet.java - Set of enum objects
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version.