ca.uwaterloo.cs.ql.fb
Interface Tuple

All Superinterfaces:
java.lang.Cloneable, java.lang.Comparable

public interface Tuple
extends java.lang.Comparable, java.lang.Cloneable


Method Summary
 java.lang.Object clone()
          Clones this Tuple.
 int compareTo(java.lang.Object o)
          Compares itself to another Tuple.
 int get(int col)
          Gets the element at col.
 int[] get(int[] cols)
          Gets the elements by way of an array of cols.
 int getDom()
          Gets the domain of this Tuple.
 Tuple getInverse()
          Gets the inverse of this Tuple.
 int getRng()
          Gets the range of this Tuple.
 void set(int col, int value)
          Assigns a value to the element at col.
 void setDom(int value)
          Sets the domain of this Tuple.
 void setRng(int value)
          Sets the range of this Tuple.
 int size()
          Counts the elements.
 int[] toArray()
          Returns an array containing all of the elements.
 

Method Detail

size

int size()
Counts the elements.


getDom

int getDom()
Gets the domain of this Tuple.


setDom

void setDom(int value)
Sets the domain of this Tuple.


getRng

int getRng()
Gets the range of this Tuple.


setRng

void setRng(int value)
Sets the range of this Tuple.


get

int get(int col)
Gets the element at col.


set

void set(int col,
         int value)
Assigns a value to the element at col.


get

int[] get(int[] cols)
Gets the elements by way of an array of cols.


getInverse

Tuple getInverse()
Gets the inverse of this Tuple.


toArray

int[] toArray()
Returns an array containing all of the elements.

Returns:
a clone of the internal array in this Tuple.

clone

java.lang.Object clone()
Clones this Tuple.


compareTo

int compareTo(java.lang.Object o)
              throws java.lang.ClassCastException
Compares itself to another Tuple.

Specified by:
compareTo in interface java.lang.Comparable
Throws:
java.lang.ClassCastException