|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--fipaos.skill.constraint.ccl.object.CSPSolution
This class represents as CSP-solution Object as described in the
"CCL Language Specification v2.01" section 4.1.1.2, p5.
This object captures the notion of a solution to a choice problem.
Here all the choices are assigned an appropriate value and the
assignment violates none of the posted constraints.
Field Summary | |
static int |
CONTENT
|
static java.lang.String |
CSPSOLUTION
String used to reference a Content object representing a CSPSolution object |
static java.lang.String |
CSPVARIABLEASSIGNMENT
String used to reference a Content object representing a CSPVariableAssignment object. |
static java.lang.String |
HREF
String used to reference the identifier of a CSPSolution object when represented as an Attribute of a Content object. |
static int |
LIST
|
static int |
LONG
|
static int |
STRING
|
Constructor Summary | |
CSPSolution()
Constructs an empty CSPSolution |
|
CSPSolution(Content content)
Constructs a new CSPSolution and populates it with the Data in the passed Content object. |
|
CSPSolution(java.lang.String name)
Constructs a CSPSolution with the given name. |
Method Summary | |
void |
addVariable(CSPVariableAssignment var)
Adds a new Variable Assignment to the CSPSolution This represents another element in the solution. |
CSPSolution |
copy()
Returns a copy of the CSPSolution object. |
void |
identify(java.lang.String str)
Identifies the CSPSolution. |
java.lang.String |
identity()
Returns the identifier for the CSPSolution. |
static void |
main(java.lang.String[] args)
Used for testing the class. |
Content |
toContent()
Returns a Content object populated with the Data held in this CSPSolution object. |
java.lang.String |
toString()
Returns a String representation of the CSPSolution. |
java.util.Vector |
variables()
Returns a Vector containing all the Variable Assignments that represent the solution to the CSP problem. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final java.lang.String CSPSOLUTION
public static final java.lang.String CSPVARIABLEASSIGNMENT
public static final java.lang.String HREF
public static final int CONTENT
public static final int LIST
public static final int LONG
public static final int STRING
Constructor Detail |
public CSPSolution()
public CSPSolution(java.lang.String name)
public CSPSolution(Content content)
Method Detail |
public void identify(java.lang.String str)
public java.lang.String identity()
public void addVariable(CSPVariableAssignment var)
public java.util.Vector variables()
public CSPSolution copy()
public java.lang.String toString()
toString
in class java.lang.Object
public Content toContent()
public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |