java.lang.Object | |||
↳ | java.util.AbstractCollection<E> | ||
↳ | java.util.AbstractSet<E> | ||
↳ | java.util.EnumSet<E extends java.lang.Enum<E>> |
An EnumSet is a specialized Set to be used with enums as keys.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates an enum set filled with all the enum elements of the specified
elementType . | |||||||||||
Creates a new enum set with the same elements as those contained in this
enum set.
| |||||||||||
Creates an enum set.
| |||||||||||
Creates an enum set.
| |||||||||||
Creates an enum set.
| |||||||||||
Creates an empty enum set.
| |||||||||||
Creates a new enum set, containing only the specified elements.
| |||||||||||
Creates a new enum set, containing only the specified element.
| |||||||||||
Creates a new enum set, containing only the specified element.
| |||||||||||
Creates a new enum set, containing only the specified element.
| |||||||||||
Creates a new enum set, containing only the specified element.
| |||||||||||
Creates a new enum set, containing only the specified element.
| |||||||||||
Creates an enum set containing all the elements within the range defined
by
start and end (inclusive). |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class java.util.AbstractSet
| |||||||||||
From class java.util.AbstractCollection
| |||||||||||
From class java.lang.Object
| |||||||||||
From interface java.lang.Iterable
| |||||||||||
From interface java.util.Collection
| |||||||||||
From interface java.util.Set
|
Creates an enum set filled with all the enum elements of the specified
elementType
.
elementType | the class object for the elements contained. |
---|
ClassCastException | if the specified element type is not and enum type. |
---|
Creates a new enum set with the same elements as those contained in this enum set.
Creates an enum set. All the contained elements complement those from the specified enum set.
s | the specified enum set. |
---|
Creates an enum set. All the contained elements are of type
Class<E>, and the contained elements are the same as those
contained in s
.
s | the enum set from which to copy. |
---|
ClassCastException | if the specified element type is not and enum type. |
---|
Creates an enum set. The contained elements are the same as those
contained in collection c
. If c is an enum set, invoking this
method is the same as invoking copyOf(EnumSet).
c | the collection from which to copy. if it is not an enum set, it must not be empty. |
---|
IllegalArgumentException | if c is not an enum set and contains no elements at all. |
---|
Creates an empty enum set. The permitted elements are of type Class<E>.
elementType | the class object for the elements contained. |
---|
elementType
.ClassCastException | if the specified element type is not and enum type. |
---|
Creates a new enum set, containing only the specified elements. It can receive an arbitrary number of elements, and runs slower than those only receiving a fixed number of elements.
start | the first initially contained element. |
---|---|
others | the other initially contained elements. |
Creates a new enum set, containing only the specified element. There are six overloadings of the method. They accept from one to five elements respectively. The sixth one receives an arbitrary number of elements, and runs slower than those that only receive a fixed number of elements.
e | the element to be initially contained. |
---|
Creates a new enum set, containing only the specified element. There are six overloadings of the method. They accept from one to five elements respectively. The sixth one receives an arbitrary number of elements, and runs slower than those that only receive a fixed number of elements.
e1 | the initially contained element. |
---|---|
e2 | another initially contained element. |
e3 | another initially contained element. |
e4 | another initially contained element. |
e5 | another initially contained element. |
Creates a new enum set, containing only the specified element. There are six overloadings of the method. They accept from one to five elements respectively. The sixth one receives an arbitrary number of elements, and runs slower than those that only receive a fixed number of elements.
e1 | the initially contained element. |
---|---|
e2 | another initially contained element. |
e3 | another initially contained element. |
Creates a new enum set, containing only the specified element. There are six overloadings of the method. They accept from one to five elements respectively. The sixth one receives an arbitrary number of elements, and runs slower than those that only receive a fixed number of elements.
e1 | the initially contained element. |
---|---|
e2 | another initially contained element. |
e3 | another initially contained element. |
e4 | another initially contained element. |
Creates a new enum set, containing only the specified element. There are six overloadings of the method. They accept from one to five elements respectively. The sixth one receives an arbitrary number of elements, and runs slower than those that only receive a fixed number of elements.
e1 | the initially contained element. |
---|---|
e2 | another initially contained element. |
Creates an enum set containing all the elements within the range defined
by start
and end
(inclusive). All the elements must be in
order.
start | the element used to define the beginning of the range. |
---|---|
end | the element used to define the end of the range. |
IllegalArgumentException | if start is behind end . |
---|