Added in API level 1
EnumConstantNotPresentException
open class EnumConstantNotPresentException : RuntimeException
kotlin.Any | ||||
↳ | kotlin.Throwable | |||
↳ | java.lang.Exception | |||
↳ | java.lang.RuntimeException | |||
↳ | 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. This exception can be thrown by the .
Summary
Public constructors | |
---|---|
EnumConstantNotPresentException(enumType: Class<out Enum<Enum<*>>!>!, constantName: String!) Constructs an |
Public methods | |
---|---|
open String! |
Returns the name of the missing enum constant. |
open Class<out Enum<Enum<*>>!>! |
enumType() Returns the type of the missing enum constant. |
Public constructors
EnumConstantNotPresentException
Added in API level 1
EnumConstantNotPresentException(
enumType: Class<out Enum<Enum<*>>!>!,
constantName: String!)
Constructs an EnumConstantNotPresentException
for the specified constant.
Parameters | |
---|---|
enumType |
Class<out Enum<Enum<*>>!>!: the type of the missing enum constant |
constantName |
String!: the name of the missing enum constant |
Public methods
constantName
Added in API level 1
open fun constantName(): String!
Returns the name of the missing enum constant.
Return | |
---|---|
String! |
the name of the missing enum constant |
enumType
Added in API level 1
open fun enumType(): Class<out Enum<Enum<*>>!>!
Returns the type of the missing enum constant.
Return | |
---|---|
Class<out Enum<Enum<*>>!>! |
the type of the missing enum constant |