Package org.chocosolver.memory
Class IStateInt
- java.lang.Object
-
- org.chocosolver.memory.IStateInt
-
-
Field Summary
Fields Modifier and Type Field Description protected intcurrentValueprotected IEnvironmentenvironmentprotected inttimeStamp
-
Constructor Summary
Constructors Constructor Description IStateInt(IEnvironment env, int i)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void_set(int y, int wstamp)Modifies the value without storing the former value on the trailing stack.intadd(int delta)modifying a StoredInt by an incrementintget()Returns the current value.voidoverrideTimeStamp(int aTimeStamp)abstract voidset(int y)Modifies the value and stores if needed the former value on the trailing stack.StringtoString()
-
-
-
Field Detail
-
environment
protected final IEnvironment environment
-
currentValue
protected int currentValue
-
timeStamp
protected int timeStamp
-
-
Constructor Detail
-
IStateInt
public IStateInt(IEnvironment env, int i)
-
-
Method Detail
-
get
public final int get()
Returns the current value.
-
set
public abstract void set(int y)
Modifies the value and stores if needed the former value on the trailing stack.
-
add
public final int add(int delta)
modifying a StoredInt by an increment- Parameters:
delta- increment value- Returns:
- the new value
-
_set
public void _set(int y, int wstamp)Modifies the value without storing the former value on the trailing stack.- Parameters:
y- the new valuewstamp- the stamp of the world in which the update is performed
-
overrideTimeStamp
public void overrideTimeStamp(int aTimeStamp)
-
-