Package myorg.entityex.annotated
Enum Dog.Breed
- java.lang.Object
-
- java.lang.Enum<Dog.Breed>
-
- myorg.entityex.annotated.Dog.Breed
-
- All Implemented Interfaces:
Serializable
,Comparable<Dog.Breed>
- Enclosing class:
- Dog
public static enum Dog.Breed extends Enum<Dog.Breed>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description LABRADOR
SAINT_BERNARD
-
Field Summary
Fields Modifier and Type Field Description String
prettyName
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method 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.
-
-
-
Field Detail
-
prettyName
public final String prettyName
-
-
Constructor Detail
-
Breed
private Breed(String prettyName)
-
-
Method Detail
-
values
public static Dog.Breed[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (Dog.Breed c : Dog.Breed.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Dog.Breed valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
-