public static enum Dog.Breed extends Enum<Dog.Breed>
Enum Constant and Description |
---|
LABRADOR |
SAINT_BERNARD |
Modifier and Type | Field and Description |
---|---|
String |
prettyName |
Modifier and Type | Method and Description |
---|---|
static Dog.Breed |
getBreed(String prettyName) |
static Dog.Breed |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Dog.Breed[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Dog.Breed LABRADOR
public static final Dog.Breed SAINT_BERNARD
public final String prettyName
public static Dog.Breed[] values()
for (Dog.Breed c : Dog.Breed.values()) System.out.println(c);
public static Dog.Breed 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.