fipaos.skill.constraint.ccl.variable
Class CSPVariableAssignment


public class CSPVariableAssignment


This class describes the object CSP-variable-assignment as described in the document

"CCL Language Specification v2.01" section 4.2.2.5, p13.



The variable named in the Variable-name slot is assigned the value given in the

Variable-value slot. This represents a variable instantiation- a choice being made.


Field Summary
 final static StringCSPVARIABLEASSIGNMENT
          
Name that a CSPVariableAssignment is referenced with when represented

as a Content object.
 final static StringNAME
          Name of the attribute a "Name" value is represented as in Content objects.

Constructor Summary
CSPVariableAssignment()
          Constucts an empty CSPVariableAssignment
CSPVariableAssignment(Content content)
          
Constructs a new CSPVariableAssignment and populates it with

Data held in the passed Content object.

Method Summary
 voidaddCSPValue(CSPValue value)
          
This is the value that is to be assigned.
 CSPVariableAssignmentcopy()
          Returns a copy of the CSPVariableAssignment object.
 CSPValuegetCSPValue()
          Returns the CSPValue this object contains
 StringgetVariableName()
          Returns the name of the value.
 static voidmain(String[] args)
          Used for testing.
 ContenttoContent()
          
Returns a Content object populated with the Data held in this class

that represents the CSPVariableAssignment.
 StringtoString()
          
Returns a String representation of this object.
 voidvariableName(String str)
          
Assigns a name to the value.

Field Detail

CSPVARIABLEASSIGNMENT

public final static String CSPVARIABLEASSIGNMENT

Name that a CSPVariableAssignment is referenced with when represented

as a Content object.

NAME

public final static String NAME
Name of the attribute a "Name" value is represented as in Content objects.
Constructor Detail

CSPVariableAssignment

public CSPVariableAssignment()
Constucts an empty CSPVariableAssignment

CSPVariableAssignment

public CSPVariableAssignment(Content content)

Constructs a new CSPVariableAssignment and populates it with

Data held in the passed Content object.
Method Detail

addCSPValue

public void addCSPValue(CSPValue value)

This is the value that is to be assigned.

The value assigned must match with the type of variable.

copy

public CSPVariableAssignment copy()
Returns a copy of the CSPVariableAssignment object.

getCSPValue

public CSPValue getCSPValue()
Returns the CSPValue this object contains

getVariableName

public String getVariableName()
Returns the name of the value.

main

public static void main(String[] args)
Used for testing.

toContent

public Content toContent()

Returns a Content object populated with the Data held in this class

that represents the CSPVariableAssignment.

toString

public String toString()

Returns a String representation of this object.

variableName

public void variableName(String str)

Assigns a name to the value.

Association Links

to Class java.lang.String


Name that a CSPVariableAssignment is referenced with when represented

as a Content object.

to Class java.lang.String

Name of the attribute a "Name" value is represented as in Content objects.

to Class java.lang.String

The name of the variable having a value assigned to it.

to Class fipaos.skill.constraint.ccl.variable.CSPValue


The value being assigned. The value assigned must match with the type of

the variable.