public enum Price extends Enum<Price>
| Enum Constant and Description |
|---|
EXPENSIVE |
FREE |
INEXPENSIVE |
MODERATE |
NONE |
VERY_EXPENSIVE |
| Modifier and Type | Method and Description |
|---|---|
static Price |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Price[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Price FREE
public static final Price INEXPENSIVE
public static final Price MODERATE
public static final Price EXPENSIVE
public static final Price VERY_EXPENSIVE
public static final Price NONE
public static Price[] values()
for (Price c : Price.values()) System.out.println(c);
public static Price 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 nullCopyright © 2014–2015. All rights reserved.