Modifier and Type | Field and Description |
---|---|
protected Object |
element |
protected ArrayList<GraphNode> |
predecessors |
protected ArrayList<GraphNode> |
successors |
Modifier and Type | Method and Description |
---|---|
void |
addPredecessor(GraphNode pred)
Add a new predecessor node.
|
void |
addSuccessor(GraphNode succ)
Add a new successor node.
|
void |
connect(GraphNode node)
Connect this node to a new node.
|
Object |
getElement()
Get the element contained in the node.
|
int |
getNbrPred()
Get the number of predecessor node.
|
int |
getNbrSucc()
Get the number of successor node.
|
GraphNode |
getPredecessor(int i)
Get a specific predecessor node.
|
GraphNode |
getSuccessor(int i)
Get a specific successor node.
|
void |
setElement(Object element)
Set the element in the node.
|
protected Object element
public GraphNode(Object element)
public Object getElement()
public void setElement(Object element)
element
- The element.public int getNbrSucc()
public GraphNode getSuccessor(int i)
i
- The number of the successor to be retrieved.public void addSuccessor(GraphNode succ)
succ
- The node to be added.public int getNbrPred()
public GraphNode getPredecessor(int i)
i
- The number of the predecessor to be retrieved.public void addPredecessor(GraphNode pred)
pred
- The node to be added.public void connect(GraphNode node)
node
- The node to be connected to.Copyright © 2006–2024 The Apache Software Foundation. All rights reserved.