All Packages Class Hierarchy This Package Previous Next Index
Class gpsys.primitives.XShort
java.lang.Object
|
+----gpsys.Primitive
|
+----gpsys.Terminal
|
+----gpsys.primitives.XShort
- public class XShort
- extends Terminal
SHORT XShort
XShort is a Terminal representing a variable of Type SHORT.
- Author:
- Adil Qureshi
Department of Computer Science,
University College London,
Gower St,
London WC1E 6BT,
UK.
- See Also:
- Type, Primitive, Terminal
-
svalue
- Holds the value of the variable.
-
XShort()
- Construct a new variable.
-
evaluateShort(Individual)
- Evaluates the variable, which returns its value.
-
instance()
- Creates a copy of this Terminal.
-
set(short)
- Sets the variable to the specified value.
-
toString()
- Creates a String representing this Terminal.
svalue
short svalue
- Holds the value of the variable.
XShort
public XShort()
- Construct a new variable.
evaluateShort
public final short evaluateShort(Individual i) throws EvaluationException
- Evaluates the variable, which returns its value.
- Parameters:
- i - The variable being evaluated.
- Returns:
- A short which is the value of the variable.
- Throws: EvaluationException
- If there is an evaluation failure.
- Overrides:
- evaluateShort in class Terminal
set
public final void set(short 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 String toString()
- Creates a String representing this Terminal.
- Returns:
- A String containing the name of this Terminal.
- Overrides:
- toString in class Primitive
All Packages Class Hierarchy This Package Previous Next Index