eaLib API Docs
Last Modified : January 7 2002

mss.ea.trm
Class CounterCondition

java.lang.Object
  |
  +--mss.ea.trm.AbstractCondition
        |
        +--mss.ea.trm.CounterCondition
All Implemented Interfaces:
Condition

public class CounterCondition
extends AbstractCondition

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 ). The maximal value is specified in the constructor.

Since:
0.1
Version:
0.1 (08-16-2001)
Author:
Andreas Rummler

Field Summary
protected  long breakValue
          Maximal value of the counter.
protected  Counter counter
          Counter to use for break condition testing.
 
Constructor Summary
CounterCondition(Counter count, long val)
          Constructor.
 
Method Summary
 boolean isTrue()
          Test of break condition.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

breakValue

protected long breakValue
Maximal value of the counter.

counter

protected Counter counter
Counter to use for break condition testing.
Constructor Detail

CounterCondition

public CounterCondition(Counter count,
                        long val)
Constructor.
Parameters:
count - counter with current number of generations
val - maximal value of the counter
Method Detail

isTrue

public boolean isTrue()
Test of break condition.
Overrides:
isTrue in class AbstractCondition
Returns:
result of the test of break condition

eaLib API Docs
Last Modified : January 7 2002

Copyright © 2000-2001 Technical University of Ilmenau, Department ESS