fipaos.skill.constraint.ccl.variable
Class Tuple

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

public class Tuple
extends java.lang.Object


A tuple specifies sets of allowed combinations.
An example of a Tuple range would be:
(Savoy, London)

The values held in a Tuple may only be Strings.
Hence integers must be represented as follows: "1".


Constructor Summary
Tuple()
          Constructs an empty Tuple.
Tuple(java.lang.String str)
          
Constructs a new Tuple and populates it with the values passed
in the String.
Tuple(java.util.Vector v)
          
Constructs a new Tuple and populates it with the values passed
in the Vector.
 
Method Summary
 void addValue(java.lang.String str)
          
Adds another Value to the tuple.
 Tuple copy()
          Returns an exact copy of this Tuple object.
 java.util.Enumeration elements()
          Returns an Enumeration of the elements held in this Tuple.
static void main(java.lang.String[] args)
          Used to test the class.
 java.lang.String toString()
          Returns a String representation of this Tuple.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Tuple

public Tuple()
Constructs an empty Tuple.

Tuple

public Tuple(java.lang.String str)

Constructs a new Tuple and populates it with the values passed
in the String. This should be a String representation of a tuple.
This String may take either of the following forms:

(house, car, boat)
house, car, boat

Hence brackets may or may not be present.

Tuple

public Tuple(java.util.Vector v)

Constructs a new Tuple and populates it with the values passed
in the Vector.
The Vector must contain String objects.
Method Detail

addValue

public void addValue(java.lang.String str)

Adds another Value to the tuple.

copy

public Tuple copy()
Returns an exact copy of this Tuple object.

toString

public java.lang.String toString()
Returns a String representation of this Tuple.
Overrides:
toString in class java.lang.Object

elements

public java.util.Enumeration elements()
Returns an Enumeration of the elements held in this Tuple.

main

public static void main(java.lang.String[] args)
Used to test the class.