aicas logoJamaica 6.4 release 1

java.lang
Class EnumConstantNotPresentException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by java.lang.EnumConstantNotPresentException
All Implemented Interfaces:
Serializable

public class EnumConstantNotPresentException
extends RuntimeException

EnumConstantNotPresentException is thrown when an attempt is made to access an enum element by name and such an element does not exist.

Since:
1.5
See Also:
Serialized Form

Constructor Summary
EnumConstantNotPresentException(Class<? extends Enum> type, String name)
          Constructor for a new instance of this exception.
 
Method Summary
 String constantName()
          constantName returns the name of the missing constant.
 Class<? extends Enum> enumType()
          enumType returns the enumeration type that did not contain the constant.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EnumConstantNotPresentException

public EnumConstantNotPresentException(Class<? extends Enum> type,
                                       String name)
Constructor for a new instance of this exception.

Parameters:
type - the enum type, must not be null.
name - the name of the missing constant, must not be null.
Method Detail

enumType

public Class<? extends Enum> enumType()
enumType returns the enumeration type that did not contain the constant.

Returns:
the enum type, never null.

constantName

public String constantName()
constantName returns the name of the missing constant.

Returns:
the name of the constant, never null.

aicas logoJamaica 6.4 release 1

aicas GmbH, Karlsruhe, Germany —www.aicas.com
Copyright © 2001-2015 aicas GmbH. All Rights Reserved.