choco.mem
Class StoredBool

java.lang.Object
  extended by choco.mem.StoredBool
All Implemented Interfaces:
IStateBool

public final class StoredBool
extends java.lang.Object
implements IStateBool

A class implementing backtrackable booleans.


Constructor Summary
StoredBool(Environment env, boolean b)
          Constructs a stored search with an initial value.
 
Method Summary
 boolean get()
          Returns the current value.
 Environment getEnvironment()
          Retrieving the environment
 void set(boolean b)
          Modifies the value and stores if needed the former value on the trailing stack.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StoredBool

public StoredBool(Environment env,
                  boolean b)
Constructs a stored search with an initial value. Note: this constructor should not be used directly: one should instead use the Environment factory

Method Detail

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

getEnvironment

public Environment getEnvironment()
Retrieving the environment

Specified by:
getEnvironment in interface IStateBool

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object