JaCoP.core
Class MutableDomain

java.lang.Object
  extended by JaCoP.core.MutableDomain
All Implemented Interfaces:
MutableVar

public class MutableDomain
extends java.lang.Object
implements MutableVar

Version:
3.1
Author:
Krzysztof Kuchcinski and Radoslaw Szymanek

Field Summary
static boolean debug
          It specifies if debugging info should be printed out.
 
Constructor Summary
MutableDomain(Store store)
           
MutableDomain(Store store, IntDomain domain)
           
 
Method Summary
 MutableVarValue previous()
          It returns the earlier value of variable comparing to the current one.
 void removeLevel(int removeLevel)
          It removes given level from mutable variable.
 void setCurrent(MutableVarValue o)
          It replace the current representation of the value with a new representation.
 java.lang.String toString()
          It returns string representation of Mutable variable.
 void update(MutableVarValue val)
          It updates the value of a mutable variable based on value given as a parameter, the stamp level of current value and stamp value of passed value.
 MutableVarValue value()
          It returns current value of MutableVariable.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

debug

public static final boolean debug
It specifies if debugging info should be printed out.

See Also:
Constant Field Values
Constructor Detail

MutableDomain

public MutableDomain(Store store)
Parameters:
store - store in which the mutable domain is created.

MutableDomain

public MutableDomain(Store store,
                     IntDomain domain)
Parameters:
store - store in which the mutable domain is created.
domain - specifies the domain used to create mutable domain.
Method Detail

previous

public MutableVarValue previous()
Description copied from interface: MutableVar
It returns the earlier value of variable comparing to the current one.

Specified by:
previous in interface MutableVar
Returns:
previous value of a mutable variable.

removeLevel

public void removeLevel(int removeLevel)
Description copied from interface: MutableVar
It removes given level from mutable variable.

Specified by:
removeLevel in interface MutableVar
Parameters:
removeLevel - it specifies the level which is being removed.

setCurrent

public void setCurrent(MutableVarValue o)
Description copied from interface: MutableVar
It replace the current representation of the value with a new representation. It ignores the store level.

Specified by:
setCurrent in interface MutableVar
Parameters:
o - value to which a mutable variable is set.

toString

public java.lang.String toString()
Description copied from interface: MutableVar
It returns string representation of Mutable variable.

Specified by:
toString in interface MutableVar
Overrides:
toString in class java.lang.Object

update

public void update(MutableVarValue val)
Description copied from interface: MutableVar
It updates the value of a mutable variable based on value given as a parameter, the stamp level of current value and stamp value of passed value.

Specified by:
update in interface MutableVar
Parameters:
val - it specifies the new value of a mutable variable.

value

public MutableVarValue value()
Description copied from interface: MutableVar
It returns current value of MutableVariable.

Specified by:
value in interface MutableVar
Returns:
current value of the mutable variable.