public enum Drinker extends Enum<Drinker>
Enum Constant and Description |
---|
HEAVILY
Heavy drinker.
|
NO
non drinker.
|
OCCASIONALLY
occasional drinker.
|
QUIT
has quit drinking.
|
QUITTING
in the process of quitting.
|
REGULARLY
regular drinker.
|
SOCIALLY
drinks socially.
|
YES
yes, a drinker of alchhol.
|
Modifier and Type | Method and Description |
---|---|
String |
getDisplayValue() |
String |
toString() |
static Drinker |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Drinker[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Drinker HEAVILY
public static final Drinker NO
public static final Drinker OCCASIONALLY
public static final Drinker QUIT
public static final Drinker QUITTING
public static final Drinker REGULARLY
public static final Drinker SOCIALLY
public static final Drinker YES
public static Drinker[] values()
for (Drinker c : Drinker.values()) System.out.println(c);
public static Drinker 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 class Enum<Drinker>
Enum.toString()
public String getDisplayValue()
Copyright © 2024 WSO2. All rights reserved.