JaCoP.core
Class MutableDomainValue

java.lang.Object
  extended by JaCoP.core.MutableDomainValue
All Implemented Interfaces:
MutableVarValue

public class MutableDomainValue
extends java.lang.Object
implements MutableVarValue

Version:
3.1
Author:
Krzysztof Kuchcinski and Radoslaw Szymanek

Field Summary
 Domain domain
          It stores the value of the mutable domain.
 
Constructor Summary
MutableDomainValue(Domain domain)
           
 
Method Summary
 java.lang.Object clone()
          It clones the value of mutable variable.
 MutableVarValue previous()
          It returns the earlier value of mutable variable.
 void setPrevious(MutableVarValue nn)
          It replaces the earlier value of a mutable variable with value passed as parameter.
 void setStamp(int stamp)
          It sets the stamp of value of mutable variable.
 int stamp()
          It returns the stamp value of value of mutable variable.
 java.lang.String toString()
          It returns string representation of the current value of mutable variable.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

domain

public Domain domain
It stores the value of the mutable domain.

Constructor Detail

MutableDomainValue

public MutableDomainValue(Domain domain)
Parameters:
domain - specifies domain stored by a mutable domain.
Method Detail

clone

public java.lang.Object clone()
Description copied from interface: MutableVarValue
It clones the value of mutable variable. It includes the stamp, pointer to earlier value, and current value of variable.

Specified by:
clone in interface MutableVarValue
Overrides:
clone in class java.lang.Object
Returns:
clone of the mutable variable value.

previous

public MutableVarValue previous()
Description copied from interface: MutableVarValue
It returns the earlier value of mutable variable.

Specified by:
previous in interface MutableVarValue
Returns:
earlier value of mutable variable.

setPrevious

public void setPrevious(MutableVarValue nn)
Description copied from interface: MutableVarValue
It replaces the earlier value of a mutable variable with value passed as parameter.

Specified by:
setPrevious in interface MutableVarValue
Parameters:
nn - the previous value for this mutable variable.

setStamp

public void setStamp(int stamp)
Description copied from interface: MutableVarValue
It sets the stamp of value of mutable variable.

Specified by:
setStamp in interface MutableVarValue
Parameters:
stamp - the new stamp of value of mutable variable

stamp

public int stamp()
Description copied from interface: MutableVarValue
It returns the stamp value of value of mutable variable.

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

toString

public java.lang.String toString()
Description copied from interface: MutableVarValue
It returns string representation of the current value of mutable variable.

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