public enum PaymentType extends Enum<PaymentType> implements AbstractEnumeration
Enum Constant and Description |
---|
CASH |
CREDIT_CARD |
VISA |
Modifier and Type | Method and Description |
---|---|
String |
getCode() |
AbstractEnumeration |
getKey(String code) |
String |
toString() |
static PaymentType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static PaymentType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final PaymentType CASH
public static final PaymentType VISA
public static final PaymentType CREDIT_CARD
public static PaymentType[] values()
for (PaymentType c : PaymentType.values()) System.out.println(c);
public static PaymentType valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic String toString()
toString
in interface AbstractEnumeration
toString
in class Enum<PaymentType>
public final String getCode()
getCode
in interface AbstractEnumeration
public final AbstractEnumeration getKey(String code)
getKey
in interface AbstractEnumeration
Copyright © 2004–2019 Ceridwen Limited. All rights reserved.