|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectca.ualberta.cs.poker.free.server.Node
public class Node
Node represents a node in a directed graph, where each node has a unique id, a list of parents, and a list of children, and optionally a name. In poker tournament form this is going to keep track of matches needing to be run, which are in progress and the outcome of finished matches
Constructor Summary | |
---|---|
Node()
Default constructor. |
|
Node(TournamentTree g)
Constructor that takes a DirectedGraph, and retrieves from it the next node ID. |
Method Summary | |
---|---|
void |
annihilateChildren()
|
java.util.List |
getChildren()
getChildren returns a List of the children of the Node. |
TournamentTree |
getContainer()
|
int |
getID()
getID returns the unique node id number of this node |
java.lang.String |
getName()
getName returns the name of Node |
java.util.List |
getNeighbours()
|
java.util.List |
getParents()
getParents returns a List of the parents of the Node. |
boolean |
hasChildren()
hasChildren determines if the Node has any children |
boolean |
hasNeighbours()
|
boolean |
hasParents()
hasParents determines if the Node has any parents |
void |
setID(int id)
|
void |
setName(java.lang.String string)
setName sets the name of the Node to the specified String |
void |
setParents(java.util.List list)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Node()
public Node(TournamentTree g)
g
- DirectedGraph from which a Node ID is retrieved.Method Detail |
---|
public java.util.List getChildren()
public int getID()
public void setID(int id)
public java.util.List getParents()
public void annihilateChildren()
public boolean hasParents()
public boolean hasChildren()
public java.lang.String getName()
public void setName(java.lang.String string)
string
- the name that the Node is to be givenpublic java.util.List getNeighbours()
public boolean hasNeighbours()
public TournamentTree getContainer()
public void setParents(java.util.List list)
list
- public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |