Package org.jacop.constraints
Class Diff2VarValue
- java.lang.Object
-
- org.jacop.constraints.Diff2VarValue
-
- All Implemented Interfaces:
java.lang.Cloneable,MutableVarValue
class Diff2VarValue extends java.lang.Object implements MutableVarValue, java.lang.Cloneable
Defines a current value of the Diff2Var and related operations on it.- Version:
- 4.8
-
-
Field Summary
Fields Modifier and Type Field Description (package private) Diff2VarValuepreviousDiff2VarValue(package private) Rectangle[]Rects(package private) intstamp
-
Constructor Summary
Constructors Constructor Description Diff2VarValue()Diff2VarValue(Rectangle[] R)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectclone()It clones the value of mutable variable.MutableVarValueprevious()It returns the earlier value of mutable variable.voidsetPrevious(MutableVarValue n)It replaces the earlier value of a mutable variable with value passed as parameter.voidsetStamp(int s)It sets the stamp of value of mutable variable.(package private) voidsetValue(java.util.List<Rectangle> VR)(package private) voidsetValue(Rectangle[] R)intstamp()It returns the stamp value of value of mutable variable.java.lang.StringtoString()It returns string representation of the current value of mutable variable.
-
-
-
Field Detail
-
previousDiff2VarValue
Diff2VarValue previousDiff2VarValue
-
Rects
Rectangle[] Rects
-
stamp
int stamp
-
-
Constructor Detail
-
Diff2VarValue
Diff2VarValue()
-
Diff2VarValue
Diff2VarValue(Rectangle[] R)
-
-
Method Detail
-
clone
public java.lang.Object clone()
Description copied from interface:MutableVarValueIt clones the value of mutable variable. It includes the stamp, pointer to earlier value, and current value of variable.- Specified by:
clonein interfaceMutableVarValue- Overrides:
clonein classjava.lang.Object- Returns:
- clone of the mutable variable value.
-
previous
public MutableVarValue previous()
Description copied from interface:MutableVarValueIt returns the earlier value of mutable variable.- Specified by:
previousin interfaceMutableVarValue- Returns:
- earlier value of mutable variable.
-
setPrevious
public void setPrevious(MutableVarValue n)
Description copied from interface:MutableVarValueIt replaces the earlier value of a mutable variable with value passed as parameter.- Specified by:
setPreviousin interfaceMutableVarValue- Parameters:
n- the previous value for this mutable variable.
-
setStamp
public void setStamp(int s)
Description copied from interface:MutableVarValueIt sets the stamp of value of mutable variable.- Specified by:
setStampin interfaceMutableVarValue- Parameters:
s- the new stamp of value of mutable variable
-
setValue
void setValue(java.util.List<Rectangle> VR)
-
setValue
void setValue(Rectangle[] R)
-
stamp
public int stamp()
Description copied from interface:MutableVarValueIt returns the stamp value of value of mutable variable.- Specified by:
stampin interfaceMutableVarValue- Returns:
- the current stamp of value of mutable variable.
-
toString
public java.lang.String toString()
Description copied from interface:MutableVarValueIt returns string representation of the current value of mutable variable.- Specified by:
toStringin interfaceMutableVarValue- Overrides:
toStringin classjava.lang.Object
-
-