fipaos.skill.constraint.ccl.variable
Class CSPVariableAssignment

java.lang.Object
  |
  +--fipaos.skill.constraint.ccl.variable.CSPVariableAssignment

public class CSPVariableAssignment
extends java.lang.Object


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
static java.lang.String CSPVARIABLEASSIGNMENT
          
Name that a CSPVariableAssignment is referenced with when represented
as a Content object.
static java.lang.String NAME
          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
 void addCSPValue(CSPValue value)
          
This is the value that is to be assigned.
 CSPVariableAssignment copy()
          Returns a copy of the CSPVariableAssignment object.
 CSPValue getCSPValue()
          Returns the CSPValue this object contains
 java.lang.String getVariableName()
          Returns the name of the value.
static void main(java.lang.String[] args)
          Used for testing.
 Content toContent()
          
Returns a Content object populated with the Data held in this class
that represents the CSPVariableAssignment.
 java.lang.String toString()
          
Returns a String representation of this object.
 void variableName(java.lang.String str)
          
Assigns a name to the value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CSPVARIABLEASSIGNMENT

public static final java.lang.String CSPVARIABLEASSIGNMENT

Name that a CSPVariableAssignment is referenced with when represented
as a Content object.

NAME

public static final java.lang.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.

getCSPValue

public CSPValue getCSPValue()
Returns the CSPValue this object contains

variableName

public void variableName(java.lang.String str)

Assigns a name to the value.

getVariableName

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

copy

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

toString

public java.lang.String toString()

Returns a String representation of this object.
Overrides:
toString in class java.lang.Object

toContent

public Content toContent()

Returns a Content object populated with the Data held in this class
that represents the CSPVariableAssignment.

main

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