fipaos.skill.constraint.ccl.variable
Class IndexPair

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

public class IndexPair
extends java.lang.Object


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(java.lang.String str)
          
Constructs a new IndexPair and populates it given the information provided
in the String.
 
Method Summary
 IndexPair copy()
          
Returns an identical copy of the IndexPair object.
 int getFirstValue()
          
Returns the first value contained in the IndexPair object.
 int getSecondValue()
          
Returns the second value contained in the IndexPair object.
static void main(java.lang.String[] args)
          
Used to test the class.
 void setFirstValue(int value)
          
Sets the value of the first value held in the IndexPair object.
 void setSecondValue(int value)
          
Sets the value of the second value held in the IndexPair object.
 java.lang.String toString()
          
Returns a String representation of the IndexPair object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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(java.lang.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

getFirstValue

public int getFirstValue()

Returns the first value contained in the IndexPair object.

setFirstValue

public void setFirstValue(int value)

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

getSecondValue

public int getSecondValue()

Returns the second value contained in the IndexPair object.

setSecondValue

public void setSecondValue(int value)

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

copy

public IndexPair copy()

Returns an identical copy of the IndexPair object.

toString

public java.lang.String toString()

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

main

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

Used to test the class.