Uses of Class
java.lang.Enum
Packages that useEnum
Package
Description
Provides classes that are fundamental to the design of the Javaprogramming language.
The
java.lang.invoke package provides low-level primitives for interactingwith the Java Virtual Machine.Contains the collections framework, some internationalization support classes,a service loader, properties, random number generation, string parsingand scanning classes, base64 encoding and decoding, a bit array, andseveral miscellaneous utility classes.
Uses ofEnum injava.lang
Modifier and TypeClassDescriptionclassThis is the common base class of all Java language enumeration classes.static final classEnum.EnumDesc<E extendsEnum<E>>Anominal descriptor for anenumconstant.Modifier and TypeMethodDescriptionstatic <E extendsEnum<E>>
Enum.EnumDesc<E> Returns a nominal descriptor for the specifiedenumclass and namestatic <T extendsEnum<T>>
TReturns the enum constant of the specified enum class with thespecified name.Modifier and TypeMethodDescriptionEnumConstantNotPresentException.enumType()Returns the type of the missing enum constant.ModifierConstructorDescriptionEnumConstantNotPresentException(Class<? extendsEnum> enumType,String constantName) Constructs anEnumConstantNotPresentExceptionfor thespecified constant.Uses ofEnum injava.lang.invoke
Methods injava.lang.invoke with type parameters of typeEnumModifier and TypeMethodDescriptionstatic <E extendsEnum<E>>
EConstantBootstraps.enumConstant(MethodHandles.Lookup lookup,String name,Class<E> type) Returns anenumconstant of the type specified bytypewith the name specified byname.Uses ofEnum injava.util
Modifier and TypeClassDescriptionclassA specializedMapimplementation for use with enum type keys.classA specializedSetimplementation for use with enum types.Modifier and TypeMethodDescriptionCreates an enum set containing all of the elements in the specifiedelement type.EnumSet.complementOf(EnumSet<E> s) Creates an enum set with the same element type as the specified enumset, initially containing all the elements of this type that arenot contained in the specified set.EnumSet.copyOf(Collection<E> c) Creates an enum set initialized from the specified collection.Creates an enum set with the same element type as the specified enumset, initially containing the same elements (if any).Creates an empty enum set with the specified element type.EnumSet.of(E e) Creates an enum set initially containing the specified element.EnumSet.of(E e1, E e2) Creates an enum set initially containing the specified elements.EnumSet.of(E first, E... rest) Creates an enum set initially containing the specified elements.EnumSet.of(E e1, E e2, E e3) Creates an enum set initially containing the specified elements.EnumSet.of(E e1, E e2, E e3, E e4) Creates an enum set initially containing the specified elements.EnumSet.of(E e1, E e2, E e3, E e4, E e5) Creates an enum set initially containing the specified elements.EnumSet.range(E from, E to) Creates an enum set initially containing all of the elements in therange defined by the two specified endpoints.