fipaos.skill.constraint.ccl.variable
Class CSPVariable


public class CSPVariable


This class describes the object CSP-variable as described in the document
"CCL Language Specification v2.01" section 4.2.2.4, p13.

This object represents a single choice to be made, along with a set of possible
options for that choice.
The Type and Role slots enable the Variable to be situated within the problem
solving context.


Field Summary
 final static StringCSPVARIABLE
          
Attribute name a CSPVariable is always referred to when represented as a
Content object.
 final static StringDOMAIN
          
Used to identify a Content object containing the values this variable may
take when the CSPVariable is represented as a Content object.
 final static StringNAME
          Used to identify a variable within a CSP when represented as a Content object.
 final static StringTYPE
          
Used to identify the type of variable this CSPVariable may contain when
represented as a Content object.

Constructor Summary
CSPVariable()
          Constucts an Empty CSPVariable.
CSPVariable(Content content)
          
Constructs a new CSPVariable and populates it using the values passed
in the Content object.

Method Summary
 voidaddType(String str)
          
This specifies another type for the CSPVariable.
 voidaddValue(CSPValue value)
          Adds another the value to the list of values this object can take.
 CSPVariablecopy()
          Produces a copy of a CSPVariable object.
 StringgetName()
          Returns the name of the CSPVariable
 CSPRangegetRange()
          
Retrieves the CSPRange value held in this variable.
 VectorgetRoles()
          Returns a Vector of the roles that this CSPVariable may take.
 VectorgetTypes()
          
This retrieves a Vector containing the types that this CSPVariable can take.
 VectorgetValues()
          
Returns a Vector containing the possible values this Variable can take.
 static voidmain(String[] args)
          Used for testing.
 voidsetName(String str)
          Sets of name for the CSPVariable
 voidsetRange(CSPRange range)
          
Sets a CSPRange object for the CSPVariable.
 voidsetRole(String str)
          Adds another role.
 ContenttoContent()
          Returns a Content object populated using the Data held in this CSPVariable.
 StringtoString()
          Produces a String representation of a CSPVariable.

Field Detail

CSPVARIABLE

public final static String CSPVARIABLE

Attribute name a CSPVariable is always referred to when represented as a
Content object.

DOMAIN

public final static String DOMAIN

Used to identify a Content object containing the values this variable may
take when the CSPVariable is represented as a Content object.

NAME

public final static String NAME
Used to identify a variable within a CSP when represented as a Content object.

TYPE

public final static String TYPE

Used to identify the type of variable this CSPVariable may contain when
represented as a Content object.
Constructor Detail

CSPVariable

public CSPVariable()
Constucts an Empty CSPVariable.

CSPVariable

public CSPVariable(Content content)

Constructs a new CSPVariable and populates it using the values passed
in the Content object.
Method Detail

addType

public void addType(String str)

This specifies another type for the CSPVariable.
This specifies the type of values a CSPVariable can take.

addValue

public void addValue(CSPValue value)
Adds another the value to the list of values this object can take.

copy

public CSPVariable copy()
Produces a copy of a CSPVariable object.

getName

public String getName()
Returns the name of the CSPVariable

getRange

public CSPRange getRange()

Retrieves the CSPRange value held in this variable.
This specifies the possible values this variable may take.

getRoles

public Vector getRoles()
Returns a Vector of the roles that this CSPVariable may take.

getTypes

public Vector getTypes()

This retrieves a Vector containing the types that this CSPVariable can take.

getValues

public Vector getValues()

Returns a Vector containing the possible values this Variable can take.

main

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

setName

public void setName(String str)
Sets of name for the CSPVariable

setRange

public void setRange(CSPRange range)

Sets a CSPRange object for the CSPVariable.
This specifies the possible values this variable may take.

setRole

public void setRole(String str)
Adds another role.

toContent

public Content toContent()
Returns a Content object populated using the Data held in this CSPVariable.

toString

public String toString()
Produces a String representation of a CSPVariable.

Association Links

to Class java.lang.String

Used to identify a variable within a CSP when represented as a Content object.

to Class java.lang.String


Used to identify the type of variable this CSPVariable may contain when
represented as a Content object.

to Class java.lang.String


Used to identify a Content object containing the values this variable may
take when the CSPVariable is represented as a Content object.

to Class java.lang.String


Attribute name a CSPVariable is always referred to when represented as a
Content object.

to Class java.lang.String


Gives a unique symbol that is used to make references to the variable
within the context of a single CSP

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

Contains information on possible values the variable may take.

to Class java.util.Vector


Contains information on possible values the variable may take.
Will contain CSPValue objects.

to Class java.util.Vector


Identifies the position of the variable within the problem solving context.
Contains a series of domain-role-terms.

to Class java.util.Vector


Specifies the type of values that the variable takes.