|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectchoco.mem.StoredInt
public final class StoredInt
A class implementing backtrackable integers.
Field Summary |
---|
Fields inherited from interface choco.mem.IStateInt |
---|
MAXINT, MININT, UNKNOWN_INT |
Constructor Summary | |
---|---|
StoredInt(Environment env)
Constructs a stored search with an unknown initial value. |
|
StoredInt(Environment env,
int i)
Constructs a stored search with an initial value. |
Method Summary | |
---|---|
void |
add(int delta)
modifying a StoredInt by an increment |
int |
get()
Returns the current value. |
Environment |
getEnvironment()
Retrieving the environment |
boolean |
isKnown()
Checks if a value is currently stored. |
void |
set(int y)
Modifies the value and stores if needed the former value on the trailing stack. |
java.lang.String |
toString()
pretty printing |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public StoredInt(Environment env)
public StoredInt(Environment env, int i)
Method Detail |
---|
public int get()
get
in interface IStateInt
public boolean isKnown()
isKnown
in interface IStateInt
public void set(int y)
set
in interface IStateInt
y
- the new value of the variable.public void add(int delta)
add
in interface IStateInt
delta
- public Environment getEnvironment()
getEnvironment
in interface IStateInt
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |