Class MutableDomainValue

java.lang.Object
org.jacop.core.MutableDomainValue
All Implemented Interfaces:
Cloneable, MutableVarValue

public class MutableDomainValue extends Object implements MutableVarValue, Cloneable
Version:
4.8
  • Field Details

    • domain

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

      MutableDomainValue previousMutableDomainVariableValue
    • stamp

      int stamp
  • Constructor Details

    • MutableDomainValue

      MutableDomainValue()
    • MutableDomainValue

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

    • clone

      public 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 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
    • setValue

      void setValue(Domain domain)
    • 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 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 Object