net.sourceforge.cilib.controlparameter
Class ConstantControlParameter

java.lang.Object
  extended by net.sourceforge.cilib.controlparameter.ConstantControlParameter
All Implemented Interfaces:
Serializable, ControlParameter, Cloneable

public class ConstantControlParameter
extends Object
implements ControlParameter

A control parameter to represent a constant value. The specified value will be maintained until it is altered.

Author:
Gary Pampara
See Also:
Serialized Form

Field Summary
protected  double parameter
           
 
Constructor Summary
ConstantControlParameter()
          Create a new instance of ConstantControlParameter.
ConstantControlParameter(ConstantControlParameter copy)
          Create a copy of the provided instance.
ConstantControlParameter(double value)
          Create a new instance of ConstantControlParameter with the provided value as the value for the ControlParameter.
 
Method Summary
 ConstantControlParameter getClone()
          Clone the current object such that a comparison of the clone and original object will yield two separate, but duplicate objects.
 double getParameter()
          Get the value of the represented parameter.
 double getParameter(double min, double max)
          Get the parameter value based on the provided min and max.
 void setParameter(double value)
          Set the value of the represented parameter.
 void updateParameter()
          Update the required and needed parameters contained within this parameter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

parameter

protected double parameter
Constructor Detail

ConstantControlParameter

public ConstantControlParameter()
Create a new instance of ConstantControlParameter.


ConstantControlParameter

public ConstantControlParameter(double value)
Create a new instance of ConstantControlParameter with the provided value as the value for the ControlParameter.

Parameters:
value - The value to set.

ConstantControlParameter

public ConstantControlParameter(ConstantControlParameter copy)
Create a copy of the provided instance.

Parameters:
copy - The instance to copy.
Method Detail

getClone

public ConstantControlParameter getClone()
Clone the current object such that a comparison of the clone and original object will yield two separate, but duplicate objects.

Specified by:
getClone in interface ControlParameter
Specified by:
getClone in interface Cloneable
Returns:
The cloned ControlParameter
See Also:
Object.clone()

getParameter

public double getParameter()
Get the value of the represented parameter.

Specified by:
getParameter in interface ControlParameter
Returns:
The value of the represented parameter.

getParameter

public double getParameter(double min,
                           double max)
Get the parameter value based on the provided min and max.

Specified by:
getParameter in interface ControlParameter
Parameters:
min - The minimum value to use in getting the parameter value
max - The maximum value to use in getting the parameter value
Returns:
The value of the represented parameter.

setParameter

public void setParameter(double value)
Set the value of the represented parameter.

Specified by:
setParameter in interface ControlParameter
Parameters:
value - The value to be used.

updateParameter

public void updateParameter()
Update the required and needed parameters contained within this parameter.

Specified by:
updateParameter in interface ControlParameter


Copyright © 2009 CIRG. All Rights Reserved.