public static enum Produce.Color extends Enum<Produce.Color>
Modifier and Type | Method and Description |
---|---|
static Produce.Color |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Produce.Color[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Produce.Color RED
public static final Produce.Color GREEN
public static final Produce.Color YELLOW
public static Produce.Color[] values()
for (Produce.Color c : Produce.Color.values()) System.out.println(c);
public static Produce.Color 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 © 2015 John's Hopkins University, Engineering Programs for Professionals. All rights reserved.