|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--DSRG.MW.Table
this class holds a number of tuples together with a Relation object in the MKB to form a relation extent. It's used for holding relation extents, since those belong in the MKB.
Field Summary | |
private java.util.Vector |
attributeNames
the schema of the Table. |
private java.util.Vector |
attributeSizes
the sizes of attribute in the attributes of the Table. |
static boolean |
DEBUG
Debug flag |
private java.lang.String |
relName
the virtual name of this relation (for query breakdown) |
private java.util.Vector |
tuples
a number of tuples in this extent |
Constructor Summary | |
Table()
a new constructor without argument... |
|
Table(int capacity)
constructs a relation extent object with a default size. |
|
Table(Table oldTable)
a copy constructor used to copy the extent. |
Method Summary | |
void |
addTuple(Tuple t)
adds a tuple at the end of this vector. |
java.util.Vector |
getAttributeNames()
|
java.util.Vector |
getAttributeSizes()
|
java.lang.String |
getRelName()
|
int |
getSize()
returns the number of tuples in this relation. |
Tuple |
getTuple(int i)
gets the tuples at index i |
java.util.Vector |
getTuples()
return this Table's vector of tuples (the reference, not a clone) |
int |
removeTuple(Tuple t,
int multiplicity)
searches for a certain tuple with the tuple's equals method and removes it from the extent. |
void |
setAttributeNames(java.util.Vector attNames)
|
void |
setAttributeSizes(java.util.Vector attSizes)
|
void |
setRelName(java.lang.String name)
|
java.lang.String |
toString()
string representation (calls toString for all tuples, one line each). |
Methods inherited from class java.lang.Object |
|
Field Detail |
public static final boolean DEBUG
private java.util.Vector tuples
private java.util.Vector attributeNames
private java.util.Vector attributeSizes
private java.lang.String relName
Constructor Detail |
public Table()
public Table(int capacity)
public Table(Table oldTable)
Method Detail |
public java.util.Vector getTuples()
public Tuple getTuple(int i)
i
- the index of the tuple to be retrievedpublic int getSize()
public void addTuple(Tuple t)
public int removeTuple(Tuple t, int multiplicity)
multiplicity
times.multiplicity
of 0, then something is wrongpublic java.lang.String toString()
public java.lang.String getRelName()
public void setRelName(java.lang.String name)
public java.util.Vector getAttributeNames()
public void setAttributeNames(java.util.Vector attNames)
public java.util.Vector getAttributeSizes()
public void setAttributeSizes(java.util.Vector attSizes)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |