public enum Smoker extends Enum<Smoker>
Enum Constant and Description |
---|
HEAVILY
A heavy smoker.
|
NO
Non smoker.
|
OCCASIONALLY
Smokes occasionally.
|
QUIT
Has quit smoking.
|
QUITTING
in the process of quitting smoking.
|
REGULARLY
regular smoker, but not a heavy smoker.
|
SOCIALLY
smokes socially.
|
YES
yes, a smoker.
|
Modifier and Type | Method and Description |
---|---|
String |
getDisplayValue() |
String |
toString() |
static Smoker |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Smoker[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Smoker HEAVILY
public static final Smoker NO
public static final Smoker OCCASIONALLY
public static final Smoker QUIT
public static final Smoker QUITTING
public static final Smoker REGULARLY
public static final Smoker SOCIALLY
public static final Smoker YES
public static Smoker[] values()
for (Smoker c : Smoker.values()) System.out.println(c);
public static Smoker 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<Smoker>
Enum.toString()
public String getDisplayValue()
Copyright © 2023 WSO2. All rights reserved.