|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectca.uwaterloo.cs.ql.fb.TupleSet
ca.uwaterloo.cs.ql.fb.NodeSet
public class NodeSet
| Field Summary |
|---|
| Fields inherited from class ca.uwaterloo.cs.ql.fb.TupleSet |
|---|
CHAOS, HAS_DUPLICATES |
| Constructor Summary | |
|---|---|
NodeSet()
NodeSet. |
|
NodeSet(int capacity)
NodeSet. |
|
NodeSet(java.lang.String name)
NodeSet. |
|
| Method Summary | |
|---|---|
void |
add(int nodeID)
Adds a node efficiently, whose ID is known. |
void |
add(java.lang.String node)
Adds a node to this set. |
void |
appendTA(java.lang.String fileName)
Appends all element data to the end of a file. |
boolean |
contain(java.lang.String node)
Tests if this NodeSet contains node. |
Node[] |
getAllNodes()
|
TupleSet |
newSet()
Creates an empty NodeSet. |
java.lang.String |
pick()
Picks a node randomly from this NodeSet. |
NodeSet |
pick(int num)
Picks a set of nodes randomly from this NodeSet. |
Node |
pickNode()
Picks a node randomly from this NodeSet. |
void |
prefixCat(java.lang.String s)
|
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. |
static NodeSet |
singleton(int nodeID)
Create a singleton set. |
static NodeSet |
singleton(java.lang.String node)
Create a singleton set. |
void |
suffixCat(java.lang.String s)
|
| Methods inherited from class ca.uwaterloo.cs.ql.fb.TupleSet |
|---|
add, add, appendDB, clone, columns, get, getAllTuples, getName, getTupleList, hasDuplicates, hasName, removeDuplicates, setFlag, setHasDuplicates, setName, size, unsetFlag |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public NodeSet()
public NodeSet(java.lang.String name)
name - the name.public NodeSet(int capacity)
capacity - the capacity.| Method Detail |
|---|
public static NodeSet singleton(int nodeID)
public static NodeSet singleton(java.lang.String node)
public void add(int nodeID)
nodeID - the node's IDpublic void add(java.lang.String node)
node - the node to add.public TupleSet newSet()
newSet in class TupleSetpublic boolean contain(java.lang.String node)
node.
node - a node to test.
true is node belongs to this set.
Otherwise, false.public java.lang.String pick()
public NodeSet pick(int num)
num - the number of nodes to pick.
public Node pickNode()
public Node[] getAllNodes()
public void print(java.io.OutputStream out)
TupleSetout.
print in class TupleSetout - the output stream.public void printTA(java.io.OutputStream out)
TupleSetout
in the TA form.
printTA in class TupleSetout - the output stream.
public void appendTA(java.lang.String fileName)
throws java.io.IOException
TupleSet
appendTA in class TupleSetfileName - the output file name.
java.io.IOExceptionpublic void prefixCat(java.lang.String s)
public void suffixCat(java.lang.String s)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||