Exception: java.lang.EnumConstantNotPresentException

Thrown when an application tries to access an enum constant by name and the enum type contains no constant with the specified name.
Authors:
@author Josh Bloch
Since:
@since 1.5

Inheritance

Superclass tree: Implements:

Methods

  • EnumConstantNotPresentExceptiontop

    public EnumConstantNotPresentException(Class<? extends Enum> enumType, String constantName)
    Constructs an EnumConstantNotPresentException for the specified constant.
    Parameters:
    @param enumType the type of the missing enum constant
    @param constantName the name of the missing enum constant
    Google Code Search
    Stack Overflow
  • constantNametop

    public String constantName()
    Returns the name of the missing enum constant.
    Return:
    @return the name of the missing enum constant
    Google Code Search
    Stack Overflow
  • enumTypetop

    public Class<? extends Enum> enumType()
    Returns the type of the missing enum constant.
    Return:
    @return the type of the missing enum constant
    Google Code Search
    Stack Overflow