gpsys.lawnmower
Class Left

java.lang.Object
  |
  +--gpsys.Primitive
        |
        +--gpsys.Terminal
              |
              +--gpsys.lawnmower.Left

public class Left
extends Terminal

	Vector2Mod8 Left
 
A Terminal that instructs the lawnmower to turn left by 90 degrees.

Version:
$Revision: 1.1 $, $Date: 2000/07/05 16:26:49 $
Author:
Adil Qureshi
Department of Computer Science,
University College London,
Gower St,
London WC1E 6BT,
UK.
See Also:
Primitive, Terminal, Serialized Form

Field Summary
private  Mower mower
          The lawnmower being controlled.
 
Fields inherited from class gpsys.Primitive
type
 
Constructor Summary
Left(Mower mower)
          Create a new Left terminal which controls the specified lawn mower.
 
Method Summary
 java.lang.Object evaluateObject(Individual i)
          Evaluates this Terminal, causing the mower to turn left by 90 degrees.
 Primitive instance()
          Creates a new instance of this Object.
 java.lang.String toString()
          Returns a String representation of this Terminal.
 
Methods inherited from class gpsys.Terminal
evaluateBoolean, evaluateByte, evaluateChar, evaluateDouble, evaluateFloat, evaluateInt, evaluateLong, evaluateShort
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

mower

private Mower mower
The lawnmower being controlled.
Constructor Detail

Left

public Left(Mower mower)
Create a new Left terminal which controls the specified lawn mower.
Parameters:
mower - The mower to be controlled.
Method Detail

evaluateObject

public final java.lang.Object evaluateObject(Individual i)
Evaluates this Terminal, causing the mower to turn left by 90 degrees.
Parameters:
i - The individual being evaluated.
Returns:
An Object (actually a Vector2Mod8) representing the Zero Vector2Mod8.
Overrides:
evaluateObject in class Terminal

instance

public final Primitive instance()
Creates a new instance of this Object.
Returns:
A reference to this same Object since none of the instance variables are to be changed.
Overrides:
instance in class Primitive

toString

public java.lang.String toString()
Returns a String representation of this Terminal.
Returns:
A String containing the name of the Terminal.
Overrides:
toString in class Primitive