Package org.jacop.core
Class MutableDomainValue
java.lang.Object
org.jacop.core.MutableDomainValue
- All Implemented Interfaces:
Cloneable
,MutableVarValue
- Version:
- 4.10
-
Field Summary
FieldsModifier and TypeFieldDescriptionIt stores the value of the mutable domain.(package private) MutableDomainValue
(package private) int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()
It clones the value of mutable variable.previous()
It returns the earlier value of mutable variable.void
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.(package private) void
int
stamp()
It returns the stamp value of value of mutable variable.toString()
It returns string representation of the current value of mutable variable.
-
Field Details
-
domain
It stores the value of the mutable domain. -
previousMutableDomainVariableValue
MutableDomainValue previousMutableDomainVariableValue -
stamp
int stamp
-
-
Constructor Details
-
MutableDomainValue
MutableDomainValue() -
MutableDomainValue
- Parameters:
domain
- specifies domain stored by a mutable domain.
-
-
Method Details
-
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 interfaceMutableVarValue
- Overrides:
clone
in classObject
- Returns:
- clone of the mutable variable value.
-
previous
Description copied from interface:MutableVarValue
It returns the earlier value of mutable variable.- Specified by:
previous
in interfaceMutableVarValue
- Returns:
- earlier value of mutable variable.
-
setPrevious
Description copied from interface:MutableVarValue
It replaces the earlier value of a mutable variable with value passed as parameter.- Specified by:
setPrevious
in interfaceMutableVarValue
- 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 interfaceMutableVarValue
- Parameters:
stamp
- the new stamp of value of mutable variable
-
setValue
-
stamp
public int stamp()Description copied from interface:MutableVarValue
It returns the stamp value of value of mutable variable.- Specified by:
stamp
in interfaceMutableVarValue
- Returns:
- the current stamp of value of mutable variable.
-
toString
Description copied from interface:MutableVarValue
It returns string representation of the current value of mutable variable.- Specified by:
toString
in interfaceMutableVarValue
- Overrides:
toString
in classObject
-