public enum Drinks extends Enum<Drinks>
| Enum Constant and Description |
|---|
BEER |
CHAMPAGNE |
COLA_LIGHT |
COLA_ZERO |
SCOTCH |
WATER |
WINE |
| Modifier and Type | Method and Description |
|---|---|
String |
getDescription() |
static Drinks |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Drinks[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Drinks WATER
public static final Drinks COLA_ZERO
public static final Drinks COLA_LIGHT
public static final Drinks WINE
public static final Drinks BEER
public static final Drinks SCOTCH
public static final Drinks CHAMPAGNE
public static Drinks[] values()
for (Drinks c : Drinks.values()) System.out.println(c);
public static Drinks 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 getDescription()
Copyright © 2005–2015 The Apache Software Foundation. All rights reserved.