- 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 long
getLimitValue()
void
init()
boolean
isMet()
boolean
isMet(long value)
void
overrideLimit(long newLimit)
void
update()
-
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:
isMet
in interfaceLongCriterion
-
overrideLimit
public final void overrideLimit(long newLimit)
- Specified by:
overrideLimit
in interfaceICounter
-
getLimitValue
public long getLimitValue()
- Specified by:
getLimitValue
in interfaceICounter
-
-