// built-in functions on every enum variable and constant

/**
 * lets you compare two enums based on the ordinal order
 */
public int compareTo( Enum e );

/**
 * enum to ordinal <br>
 * tells you where in the order this enum constant fits, first one is 0. The
 * compiler automatically generates an ordinal field in each object telling it
 * where it belongs in the order.
 */
public int ordinal();

/**
 * enum to String <br>
 * gets the name of this enum constant as a String. You can also use name() but not getName() or name.
  */
public static String toString();

/**
 * String to enum <br>
 * turns a String into its corresponding enum constant e.g. converting from
 * String to enum, saves reams of ifs or hashMap lookups. The compiler magically
 * generates this method for you. You will not find it is the base Enum class.
 * If there is no match for the string, it will throw an
 * IllegalArgumentException Unfortunately there is no mechanism to give your
 * enums aliases for alternate legal string values for the same enum, e.g. true
 * yes t y Case sensitive match, no extraneous whitespace permitted in the
 * string.
 */
public static EnumType valueOf( String s );

/*
 * example use of valueOf<br> could be any exact match of an enum
 * If there is no match for the String, valueOf will throw an
 * IllegalArgumentException.
 */
Breed mydog = Breed.valueOf( Breed.class, "Dachshund"  );

/**
 * get all possible enums
 */
public static EnumType[] values();

/*
 * ordinal to enum
 */
Breed myDog = Breed.values()[i];

/**
 * Collection of all possible enums
 * The compiler builds an array of the enum constants in order, called $VALUES
 * that it clones and returns.
 * NOTE! This is a static method.
 * You can't directly use it in generic code passed an enum value as a parameter.
 * You can use Class.getDeclaringClass and Class.getEnumValues in that case.
 */
public static EnumType[] values();

/*
 * Example iterating over all possibilities. <br> Print out a list of all
 * possible breeds.
 */
for ( Breed breed : Breed.values() )
   {
   out.println( breed );
   }

/**
 * compare to enum types for equality
 */
public static boolean equals( Object o );