java.lang.Objectjava.lang.Enum<Colour>
Colour
public enum Colour
Enumeration class Colour - write a description of the enum class 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 |
---|
public static final Colour BLACK
public static final Colour BLUE
public static final Colour GREEN
public static final Colour MAGENTA
public static final Colour RED
public static final Colour YELLOW
Method Detail |
---|
public static Colour valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.
java.lang.IllegalArgumentException
- if this enum type has no constant
with the specified namepublic static final Colour[] values()
for(Colour c : Colour.values()) System.out.println(c);