Class ACounter
- java.lang.Object
-
- org.chocosolver.solver.search.limits.ACounter
-
- All Implemented Interfaces:
ICounter,Criterion,LongCriterion
- Direct Known Subclasses:
BacktrackCounter,FailCounter,NodeCounter,SolutionCounter,TimeCounter
public abstract class ACounter extends Object implements ICounter
Overrides all but one services for ICounter and provides easy to implement counter based onIMeasures.- Since:
- 29 juil. 2010
- Author:
- Charles Prud'homme
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.chocosolver.solver.search.limits.ICounter
ICounter.Impl
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetLimitValue()voidinit()booleanisMet()booleanisMet(long value)voidoverrideLimit(long newLimit)voidupdate()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.chocosolver.solver.search.limits.ICounter
currentValue
-
-
-
-
Field Detail
-
measures
protected IMeasures measures
-
max
protected long max
-
-
Constructor Detail
-
ACounter
public ACounter(IMeasures measures, long limit)
-
-
Method Detail
-
isMet
public boolean isMet(long value)
- Specified by:
isMetin interfaceLongCriterion
-
overrideLimit
public final void overrideLimit(long newLimit)
- Specified by:
overrideLimitin interfaceICounter
-
getLimitValue
public long getLimitValue()
- Specified by:
getLimitValuein interfaceICounter
-
-