proj2
Enum CookieFlavors

java.lang.Object
  extended by java.lang.Enum<CookieFlavors>
      extended by proj2.CookieFlavors
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<CookieFlavors>

public enum CookieFlavors
extends java.lang.Enum<CookieFlavors>

An enum used to represent various cookie flavors.

This class is provided for you — you must not change it.

Version:
3/6/2011
Author:
Susan M. Mitchell (10/19/10), Daniel J. Hood (3/6/11)

Enum Constant Summary
CHOCOLATE_CHIP
          Represents a Chocolate Chip cookie flavor.
LEMON
          Represents a Lemon cookie flavor.
OATMEAL
          Represents an Oatmeal cookie flavor.
 
Method Summary
 java.lang.String toString()
          Returns a string representation of the cookie flavor.
static CookieFlavors valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static CookieFlavors[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

CHOCOLATE_CHIP

public static final CookieFlavors CHOCOLATE_CHIP
Represents a Chocolate Chip cookie flavor.


OATMEAL

public static final CookieFlavors OATMEAL
Represents an Oatmeal cookie flavor.


LEMON

public static final CookieFlavors LEMON
Represents a Lemon cookie flavor.

Method Detail

values

public static CookieFlavors[] 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 (CookieFlavors c : CookieFlavors.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static CookieFlavors valueOf(java.lang.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:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

toString

public java.lang.String toString()
Returns a string representation of the cookie flavor.

Overrides:
toString in class java.lang.Enum<CookieFlavors>