fipaos.skill.constraint.ccl.variable
Class IndexPair


public class IndexPair


This class describes the object Index-pair as described in the document
"CCL Language Specification v2.01" section 4.2.4.6, p17.

Indices are used in relations to reference the individual fields in tuples.
Given two variables with tuple valued variables, the index-pair indicates
a field in the first and a field in the second which are somehow related.

This type is not described in section 4.2.2 "Variable related items"
but in section 4.2.4 "Ontology Related Items and Terminals".
However all other terms in this section are simple types so this object
has been put into the "variables" package for convenience.


Constructor Summary
IndexPair()
          
Constructs an Empty IndexPair.
IndexPair(int first_value, int second_value)
          
Constructs an IndexPair using the Values specified.
IndexPair(String str)
          
Constructs a new IndexPair and populates it given the information provided
in the String.

Method Summary
 IndexPaircopy()
          
Returns an identical copy of the IndexPair object.
 intgetFirstValue()
          
Returns the first value contained in the IndexPair object.
 intgetSecondValue()
          
Returns the second value contained in the IndexPair object.
 static voidmain(String[] args)
          
Used to test the class.
 voidsetFirstValue(int value)
          
Sets the value of the first value held in the IndexPair object.
 voidsetSecondValue(int value)
          
Sets the value of the second value held in the IndexPair object.
 StringtoString()
          
Returns a String representation of the IndexPair object.

Constructor Detail

IndexPair

public IndexPair()

Constructs an Empty IndexPair.

IndexPair

public IndexPair(int first_value, int second_value)

Constructs an IndexPair using the Values specified.

IndexPair

public IndexPair(String str)

Constructs a new IndexPair and populates it given the information provided
in the String.

The String to be used should take one of the following forms:
{(2, 2)}
(2, 2)
Method Detail

copy

public IndexPair copy()

Returns an identical copy of the IndexPair object.

getFirstValue

public int getFirstValue()

Returns the first value contained in the IndexPair object.

getSecondValue

public int getSecondValue()

Returns the second value contained in the IndexPair object.

main

public static void main(String[] args)

Used to test the class.

setFirstValue

public void setFirstValue(int value)

Sets the value of the first value held in the IndexPair object.

setSecondValue

public void setSecondValue(int value)

Sets the value of the second value held in the IndexPair object.

toString

public String toString()

Returns a String representation of the IndexPair object.