Evolvica Core API Version 0.6.2
Last Modified: June 29 2004

org.evolvica.core.terminate
Class CounterCondition

java.lang.Object
  extended byorg.evolvica.core.terminate.CounterCondition
All Implemented Interfaces:
ICondition

public class CounterCondition
extends java.lang.Object
implements ICondition

Termination after reaching a specified value of a counter. The break condition is fulfilled in case of (current value of counter >= maximal value of counter). Each time this condition is checked the internal counter is incremented by 1.

Since:
0.4.0
Version:
$Revision: 1.7 $ $Date: 2004/05/26 11:58:19 $
Author:
Andreas Rummler

Field Summary
protected  int counter
          Counter to use for break condition testing.
protected  int maxValue
          Maximal value of the counter.
 
Constructor Summary
CounterCondition()
          Constructor.
CounterCondition(int maxValue)
          Constructor.
 
Method Summary
 int getMaxValue()
           
 boolean isTrue(IIndividualSet set)
          Test of the condition.
 void setMaxValue(int maxValue)
          Sets the maxValue.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

maxValue

protected int maxValue
Maximal value of the counter. The default value is 1.


counter

protected int counter
Counter to use for break condition testing.

Constructor Detail

CounterCondition

public CounterCondition()
Constructor.


CounterCondition

public CounterCondition(int maxValue)
Constructor.

Parameters:
maxValue - maximal counter value
Method Detail

isTrue

public boolean isTrue(IIndividualSet set)
Test of the condition.

Specified by:
isTrue in interface ICondition
Parameters:
set - individual set
Returns:
result of the test of the condition

getMaxValue

public int getMaxValue()
Returns:
int

setMaxValue

public void setMaxValue(int maxValue)
Sets the maxValue.

Parameters:
maxValue - The maxValue to set

Evolvica Core API Version 0.6.2
Last Modified: June 29 2004

Copyright © 2000-2004 Technical University of Ilmenau, Department Electronic Circuits and Systems