Enum Colour

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

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

Enumeration class Colour - write a description of the enum class here

Version:
(version number or date here)

Enum Constant Summary
BLACK
           
BLUE
           
GREEN
           
MAGENTA
           
RED
           
YELLOW
           
 
Method Summary
static Colour valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static Colour[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

BLACK

public static final Colour BLACK

BLUE

public static final Colour BLUE

GREEN

public static final Colour GREEN

MAGENTA

public static final Colour MAGENTA

RED

public static final Colour RED

YELLOW

public static final Colour YELLOW
Method Detail

valueOf

public static Colour 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

values

public static final Colour[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(Colour c : Colour.values())
        System.out.println(c);

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