Please note that the contents of this offline web site may be out of date. To access the most recent documentation visit the online version .
Note that links that point to online resources are green in color and will open in a new window.
We would love it if you could give us feedback about this material by filling this form (You have to be online to fill it)
Android APIs
public class

EnumConstantNotPresentException

extends RuntimeException
java.lang.Object
   ↳ java.lang.Throwable
     ↳ java.lang.Exception
       ↳ java.lang.RuntimeException
         ↳ java.lang.EnumConstantNotPresentException

Class Overview

Thrown if an enum constant does not exist for a particular name.

Summary

Public Constructors
, java.lang.String)">EnumConstantNotPresentException ( Class <? extends  Enum > enumType, String constantName)
Constructs a new EnumConstantNotPresentException with the current stack trace and a detail message based on the specified enum type and missing constant name.
Public Methods
String constantName ()
Gets the name of the missing constant.
Class <? extends  Enum > enumType ()
Gets the enum type for which the constant name is missing.
[Expand]
Inherited Methods
From class java.lang.Throwable
From class java.lang.Object

Public Constructors

, java.lang.String)">

public EnumConstantNotPresentException ( Class <? extends  Enum > enumType, String constantName)

Added in API level 1

Constructs a new EnumConstantNotPresentException with the current stack trace and a detail message based on the specified enum type and missing constant name.

Parameters
enumType the enum type.
constantName the missing constant name.

Public Methods

public String constantName ()

Added in API level 1

Gets the name of the missing constant.

Returns
  • the name of the constant that has not been found in the enum type.

public Class <? extends  Enum > enumType ()

Added in API level 1

Gets the enum type for which the constant name is missing.

Returns
  • the enum type for which a constant name has not been found.