gpsys.primitives
Class XBoolean

java.lang.Object
  |
  +--gpsys.Primitive
        |
        +--gpsys.Terminal
              |
              +--gpsys.primitives.XBoolean

public class XBoolean
extends Terminal

	BOOLEAN XBoolean
 
XBoolean is a Terminal representing a variable of Type BOOLEAN.

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

Field Summary
(package private)  boolean bvalue
          Holds the value of the variable.
 
Fields inherited from class gpsys.Primitive
type
 
Constructor Summary
XBoolean()
          Construct a new variable.
 
Method Summary
 boolean evaluateBoolean(Individual i)
          Evaluates the variable, which returns its value.
 Primitive instance()
          Creates a copy of this Terminal.
 void set(boolean value)
          Sets the variable to the specified value.
 java.lang.String toString()
          Creates a String representing this Terminal.
 
Methods inherited from class gpsys.Terminal
evaluateByte, evaluateChar, evaluateDouble, evaluateFloat, evaluateInt, evaluateLong, evaluateObject, evaluateShort
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

bvalue

boolean bvalue
Holds the value of the variable.
Constructor Detail

XBoolean

public XBoolean()
Construct a new variable.
Method Detail

evaluateBoolean

public final boolean evaluateBoolean(Individual i)
                              throws EvaluationException
Evaluates the variable, which returns its value.
Parameters:
i - The variable being evaluated.
Returns:
A boolean which is the value of the variable.
Throws:
EvaluationException - If there is an evaluation failure.
Overrides:
evaluateBoolean in class Terminal

set

public final void set(boolean value)
Sets the variable to the specified value.
Parameters:
value - The value to be assigned to the variable.

instance

public final Primitive instance()
Creates a copy of this Terminal.
Returns:
Actaully a reference to the same Terminal since there is no change in instance variables required.
Overrides:
instance in class Primitive

toString

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