jopt.csp.solution
Class SetSolution

java.lang.Object
  extended byjopt.csp.solution.SetSolution
All Implemented Interfaces:
java.lang.Cloneable, VariableSolution

public class SetSolution
extends java.lang.Object
implements VariableSolution

Solution to a set variable


Constructor Summary
SetSolution(CspSetVariable var)
          Initializes internal solution information for variable
 
Method Summary
 java.lang.Object clone()
           
 boolean equals(java.lang.Object obj)
           
 java.util.Set getPossibleSet()
          Returns the set of possible values for the variable
 java.util.Set getRequiredSet()
          Returns the set of required values for the variable
 CspVariable getVariable()
          Returns variable solution is based upon
 int hashCode()
           
 boolean isBound()
          Returns true if variable is bound in solution
 void restore()
          Restores (certain) recorded information to the associated variable.
 void setPossibleSet(java.util.Set possibleSet)
          Sets the set of possible values for the variable
 void setRequiredSet(java.util.Set requiredSet)
          Set the set of required values for the variable
 void store()
          Causes variable solution to capture certain information about it's variable and store it locally so that it can be restored later.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SetSolution

public SetSolution(CspSetVariable var)
Initializes internal solution information for variable

Parameters:
var - Variable to store solution information about
Method Detail

getVariable

public CspVariable getVariable()
Description copied from interface: VariableSolution
Returns variable solution is based upon

Specified by:
getVariable in interface VariableSolution

isBound

public boolean isBound()
Description copied from interface: VariableSolution
Returns true if variable is bound in solution

Specified by:
isBound in interface VariableSolution

getPossibleSet

public java.util.Set getPossibleSet()
Returns the set of possible values for the variable


getRequiredSet

public java.util.Set getRequiredSet()
Returns the set of required values for the variable


setPossibleSet

public void setPossibleSet(java.util.Set possibleSet)
Sets the set of possible values for the variable


setRequiredSet

public void setRequiredSet(java.util.Set requiredSet)
Set the set of required values for the variable


store

public void store()
Description copied from interface: VariableSolution
Causes variable solution to capture certain information about it's variable and store it locally so that it can be restored later. History is not kept: calling this method overwrites any previous information captured from previous calls to this method.

Specified by:
store in interface VariableSolution

restore

public void restore()
             throws PropagationFailureException
Description copied from interface: VariableSolution
Restores (certain) recorded information to the associated variable. This is the information stored when the store() was most recently called.

Specified by:
restore in interface VariableSolution
Throws:
PropagationFailureException

toString

public java.lang.String toString()

hashCode

public int hashCode()

equals

public boolean equals(java.lang.Object obj)

clone

public java.lang.Object clone()
Specified by:
clone in interface VariableSolution