ca.uwaterloo.cs.ql.fb
Class TupleSet

java.lang.Object
  extended by ca.uwaterloo.cs.ql.fb.TupleSet
All Implemented Interfaces:
java.lang.Cloneable
Direct Known Subclasses:
EdgeSet, NodeSet

public class TupleSet
extends java.lang.Object
implements java.lang.Cloneable


Field Summary
static int CHAOS
           
static int HAS_DUPLICATES
           
 
Constructor Summary
TupleSet()
           
TupleSet(int initialCapacity)
           
TupleSet(java.lang.String name)
           
 
Method Summary
 void add(java.lang.String[] elems)
          Add a tuple.
 void add(Tuple t)
           
 void appendDB(java.lang.String fileName)
          Appends all element data to the end of a file.
 void appendTA(java.lang.String fileName)
          Appends all element data to the end of a file.
 java.lang.Object clone()
          Makes a clone of this TupleSet.
 int columns()
           
 Tuple get(int index)
           
 Tuple[] getAllTuples()
           
 java.lang.String getName()
           
 TupleList getTupleList()
           
 boolean hasDuplicates()
           
 boolean hasName()
           
 TupleSet newSet()
          Needs to be overwritten.
 void print(java.io.OutputStream out)
          Prints all element data to out.
 void printTA(java.io.OutputStream out)
          Prints all element data to out in the TA form.
 void removeDuplicates()
           
 void setFlag(int flag)
           
 void setHasDuplicates(boolean b)
           
 void setName(java.lang.String name)
           
 int size()
           
 void unsetFlag(int flag)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CHAOS

public static final int CHAOS
See Also:
Constant Field Values

HAS_DUPLICATES

public static final int HAS_DUPLICATES
See Also:
Constant Field Values
Constructor Detail

TupleSet

public TupleSet()

TupleSet

public TupleSet(int initialCapacity)

TupleSet

public TupleSet(java.lang.String name)
Method Detail

hasName

public boolean hasName()

getName

public java.lang.String getName()

setName

public void setName(java.lang.String name)

setFlag

public void setFlag(int flag)

unsetFlag

public void unsetFlag(int flag)

hasDuplicates

public boolean hasDuplicates()

setHasDuplicates

public void setHasDuplicates(boolean b)

size

public int size()

columns

public int columns()

add

public void add(Tuple t)

get

public Tuple get(int index)

getAllTuples

public Tuple[] getAllTuples()

getTupleList

public TupleList getTupleList()

newSet

public TupleSet newSet()
Needs to be overwritten.


clone

public java.lang.Object clone()
Makes a clone of this TupleSet.

Overrides:
clone in class java.lang.Object

removeDuplicates

public void removeDuplicates()

print

public void print(java.io.OutputStream out)
Prints all element data to out.

Parameters:
out - the output stream.

printTA

public void printTA(java.io.OutputStream out)
Prints all element data to out in the TA form.

Parameters:
out - the output stream.

appendTA

public void appendTA(java.lang.String fileName)
              throws java.io.IOException
Appends all element data to the end of a file.

Parameters:
fileName - the output file name.
Throws:
java.io.IOException

appendDB

public void appendDB(java.lang.String fileName)
              throws java.io.IOException
Appends all element data to the end of a file.

Parameters:
fileName - the output file name.
Throws:
java.io.IOException

add

public void add(java.lang.String[] elems)
Add a tuple.

Parameters:
elems - the elements.