Class RobotColor

java.lang.Object
  |
  +--Enumerate
        |
        +--RobotColor
All Implemented Interfaces:
java.io.Serializable

public class RobotColor
extends Enumerate

The RobotColor class extends the Enumerate class and represents the four colors a Robot can be.

The colors are:
1. Blue
2. Red
3. Green
4. Yellow

See Also:
Serialized Form

Field Summary
static RobotColor BLUE
           
static RobotColor GREEN
           
static RobotColor RED
           
static RobotColor YELLOW
           
 
Constructor Summary
RobotColor(java.lang.String name)
          Constructor - calls the constructor of the Enumerate class that RobotColor inherits.
 
Method Summary
 RobotColor getColor()
          Returns the current color
 void setColor(RobotColor newColor)
          Sets the current color to the parameter passed
 
Methods inherited from class Enumerate
get, get, getName, iterator, pos, readResolve, size, toArray, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

BLUE

public static final RobotColor BLUE

RED

public static final RobotColor RED

GREEN

public static final RobotColor GREEN

YELLOW

public static final RobotColor YELLOW
Constructor Detail

RobotColor

public RobotColor(java.lang.String name)

Constructor - calls the constructor of the Enumerate class that RobotColor inherits.

Parameters:
name - the name of the direction: blue, red, green or yellow
Method Detail

getColor

public RobotColor getColor()
Returns the current color
Returns:
RobotColor color - the current color selected

setColor

public void setColor(RobotColor newColor)
Sets the current color to the parameter passed
Parameters:
newColor - the new color to set color to