| java.util.EnumSet
Method Summary | |
public static EnumSet<E> | allOf(Class<E> elementType) Creates an enum set. | public EnumSet<E> | clone() Creates a new enum set with the same elements as those contained in this
enum set. | abstract void | complement() | public static EnumSet<E> | complementOf(EnumSet<E> s) Creates an enum set. | public static EnumSet<E> | copyOf(EnumSet<E> s) Creates an enum set. | public static EnumSet<E> | copyOf(Collection<E> c) Creates an enum set. | boolean | isValidType(Class cls) | public static EnumSet<E> | noneOf(Class<E> elementType) Creates an empty enum set. | public static EnumSet<E> | of(E e) Creates a new enum set, containing only the specified element. | public static EnumSet<E> | of(E e1, E e2) Creates a new enum set, containing only the specified elements. | public static EnumSet<E> | of(E e1, E e2, E e3) Creates a new enum set, containing only the specified elements. | public static EnumSet<E> | of(E e1, E e2, E e3, E e4) Creates a new enum set, containing only the specified elements. | public static EnumSet<E> | of(E e1, E e2, E e3, E e4, E e5) Creates a new enum set, containing only the specified elements. | public static EnumSet<E> | of(E start, E... others) Creates a new enum set, containing only the specified elements. | public static EnumSet<E> | range(E start, E end) Creates an enum set containing all the elements within the range defined
by start and end (inclusive). | abstract void | setRange(E start, E end) | Object | writeReplace() |
allOf | public static EnumSet<E> allOf(Class<E> elementType)(Code) | | Creates an enum set. Element is contained in this enum set if and only if
it is a member of the specified element type.
Parameters: elementType - the class object for the elements contained an enum set with elements solely from the specified element type throws: NullPointerException - if the specified elementType is null |
clone | public EnumSet<E> clone()(Code) | | Creates a new enum set with the same elements as those contained in this
enum set.
a new enum set with the same elements as those contained in thisenum set |
complement | abstract void complement()(Code) | | |
complementOf | public static EnumSet<E> complementOf(EnumSet<E> s)(Code) | | Creates an enum set. All the contained elements complement those from the
specified enum set.
Parameters: s - the specified enum set an enum set with all the elements complement those from thespecified enum set throws: NullPointerException - if the specified enum set is null |
copyOf | public static EnumSet<E> copyOf(EnumSet<E> s)(Code) | | Creates an enum set. All the contained elements are of type Class,
and the contained elements are the same as those contained in s.
Parameters: s - the enum set from which to copy an enum set with all the elements from the specified enum set throws: NullPointerException - if the specified enum set is null |
copyOf | public static EnumSet<E> copyOf(Collection<E> c)(Code) | | 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
EnumSet.copyOf(EnumSet) .
Parameters: c - the collection from which to copy an enum set with all the elements from the specified collection throws: IllegalArgumentException - if c is not an enum set and contains no elements at all throws: NullPointerException - if the specified collection is null |
noneOf | public static EnumSet<E> noneOf(Class<E> elementType)(Code) | | Creates an empty enum set. The permitted elements are of type Class.
Parameters: elementType - the class object for the elements contained an empty enum set, with permitted elements of the specifiedelementType throws: NullPointerException - if the specified elementType is null |
of | public static EnumSet<E> of(E e)(Code) | | 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 arbitrary number of elements, and
runs slower than those only receive fixed number of elements.
Parameters: e - the initially contained element an enum set containing the specified element throws: NullPointerException - if the specified element is null |
of | public static EnumSet<E> of(E e1, E e2)(Code) | | Creates a new enum set, containing only the specified elements. There are
six overloadings of the method. They accept from one to five elements
respectively. The sixth one receives arbitrary number of elements, and
runs slower than those only receive fixed number of elements.
Parameters: e1 - the initially contained element Parameters: e2 - another initially contained element an enum set containing the specified elements throws: NullPointerException - if any of the specified elements is null |
of | public static EnumSet<E> of(E e1, E e2, E e3)(Code) | | Creates a new enum set, containing only the specified elements. There are
six overloadings of the method. They accept from one to five elements
respectively. The sixth one receives arbitrary number of elements, and
runs slower than those only receive fixed number of elements.
Parameters: e1 - the initially contained element Parameters: e2 - another initially contained element Parameters: e3 - another initially contained element an enum set containing the specified elements throws: NullPointerException - if any of the specified elements is null |
of | public static EnumSet<E> of(E e1, E e2, E e3, E e4)(Code) | | Creates a new enum set, containing only the specified elements. There are
six overloadings of the method. They accept from one to five elements
respectively. The sixth one receives arbitrary number of elements, and
runs slower than those only receive fixed number of elements.
Parameters: e1 - the initially contained element Parameters: e2 - another initially contained element Parameters: e3 - another initially contained element Parameters: e4 - another initially contained element an enum set containing the specified elements throws: NullPointerException - if any of the specified elements is null |
of | public static EnumSet<E> of(E e1, E e2, E e3, E e4, E e5)(Code) | | Creates a new enum set, containing only the specified elements. There are
six overloadings of the method. They accept from one to five elements
respectively. The sixth one receives arbitrary number of elements, and
runs slower than those only receive fixed number of elements.
Parameters: e1 - the initially contained element Parameters: e2 - another initially contained element Parameters: e3 - another initially contained element Parameters: e4 - another initially contained element Parameters: e5 - another initially contained element an enum set containing the specified elements throws: NullPointerException - if any of the specified elements is null |
of | public static EnumSet<E> of(E start, E... others)(Code) | | Creates a new enum set, containing only the specified elements. It
receives arbitrary number of elements, and runs slower than those only
receive fixed number of elements.
Parameters: start - the first initially contained element Parameters: others - the other initially contained elements an enum set containing the specified elements throws: NullPointerException - if any of the specified elements is null |
range | public static EnumSet<E> range(E start, E end)(Code) | | Creates an enum set containing all the elements within the range defined
by start and end (inclusive). All the elements must be in order.
Parameters: start - the element used to define the beginning of the range Parameters: end - the element used to define the end of the range an enum set with elements in the range from start to end throws: NullPointerException - if any one of start or end is null throws: IllegalArgumentException - if start is behind end |
setRange | abstract void setRange(E start, E end)(Code) | | |
|
|