Package | Description |
---|---|
java.lang |
Provides classes that are fundamental to the design of the Java
programming language.
|
java.util |
Contains the collections framework, legacy collection classes, event model,
date and time facilities, internationalization, and miscellaneous utility
classes (a string tokenizer, a random-number generator, and a bit array).
|
Modifier and Type | Class and Description |
---|---|
class |
Enum<E extends Enum<E>>
This is the common base class of all Java language enumeration types.
|
Modifier and Type | Method and Description |
---|---|
static <T extends Enum<T>> |
Enum.valueOf(Class<T> enumType,
String name)
Returns the enum constant of the specified enum type with the
specified name.
|
Modifier and Type | Method and Description |
---|---|
Class<? extends Enum> |
EnumConstantNotPresentException.enumType()
Returns the type of the missing enum constant.
|
Constructor and Description |
---|
EnumConstantNotPresentException(Class<? extends Enum> enumType,
String constantName)
Constructs an EnumConstantNotPresentException for the
specified constant.
|
Modifier and Type | Class and Description |
---|---|
class |
EnumMap<K extends Enum<K>,V>
A specialized
Map implementation for use with enum type keys. |
class |
EnumSet<E extends Enum<E>>
A specialized
Set implementation for use with enum types. |
Modifier and Type | Method and Description |
---|---|
static <E extends Enum<E>> |
EnumSet.allOf(Class<E> elementType)
Creates an enum set containing all of the elements in the specified
element type.
|
static <E extends Enum<E>> |
EnumSet.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.
|
static <E extends Enum<E>> |
EnumSet.copyOf(Collection<E> c)
Creates an enum set initialized from the specified collection.
|
static <E extends Enum<E>> |
EnumSet.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).
|
static <E extends Enum<E>> |
EnumSet.noneOf(Class<E> elementType)
Creates an empty enum set with the specified element type.
|
static <E extends Enum<E>> |
EnumSet.of(E e)
Creates an enum set initially containing the specified element.
|
static <E extends Enum<E>> |
EnumSet.of(E first,
E... rest)
Creates an enum set initially containing the specified elements.
|
static <E extends Enum<E>> |
EnumSet.of(E e1,
E e2)
Creates an enum set initially containing the specified elements.
|
static <E extends Enum<E>> |
EnumSet.of(E e1,
E e2,
E e3)
Creates an enum set initially containing the specified elements.
|
static <E extends Enum<E>> |
EnumSet.of(E e1,
E e2,
E e3,
E e4)
Creates an enum set initially containing the specified elements.
|
static <E extends Enum<E>> |
EnumSet.of(E e1,
E e2,
E e3,
E e4,
E e5)
Creates an enum set initially containing the specified elements.
|
static <E extends Enum<E>> |
EnumSet.range(E from,
E to)
Creates an enum set initially containing all of the elements in the
range defined by the two specified endpoints.
|
Modifier and Type | Method and Description |
---|---|
static <E extends Enum<E>> |
EnumSet.of(E first,
E... rest)
Creates an enum set initially containing the specified elements.
|
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2022, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.