choco.kernel.memory.trailing
Class StoredBool
java.lang.Object
choco.kernel.memory.trailing.AbstractStoredObject
choco.kernel.memory.trailing.StoredBool
- All Implemented Interfaces:
- IStateBool
public final class StoredBool
- extends AbstractStoredObject
- implements IStateBool
A class implementing backtrackable booleans.
Method Summary |
void |
_set(boolean b,
int wstamp)
Modifies the value without storing the former value on the trailing stack. |
boolean |
get()
Returns the current value. |
void |
set(boolean b)
Modifies the value and stores if needed the former value on the
trailing stack. |
String |
toString()
|
myTrail
protected final StoredBoolTrail myTrail
StoredBool
public StoredBool(EnvironmentTrailing env,
boolean b)
- Constructs a stored search with an initial value.
Note: this constructor should not be used directly: one should instead
use the IEnvironment factory
get
public boolean get()
- Returns the current value.
- Specified by:
get
in interface IStateBool
set
public void set(boolean b)
- Modifies the value and stores if needed the former value on the
trailing stack.
- Specified by:
set
in interface IStateBool
_set
public void _set(boolean b,
int wstamp)
- Modifies the value without storing the former value on the trailing stack.
- Parameters:
b
- the new valuewstamp
- the stamp of the world in which the update is performed
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2012. All Rights Reserved.