public class Node
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
void |
addIncomingEdge(Edge edge)
Method to add an incoming edge.
|
void |
addOutgoingEdge(Edge edge)
Method to add an outgoing edge.
|
java.lang.String |
getID()
Returns the ID of a node.
|
java.lang.Object |
getObject()
Retrieves the object associated with this node.
|
NodeType |
getType()
Returns type of a node.
|
boolean |
hasMoreIncomingEdges()
Whether there are more incoming edges.
|
boolean |
hasMoreOutgoingEdges()
Whether there are more outgoing edges.
|
int |
incomingEdgesSize()
Returns the size of the incoming edges list.
|
boolean |
isType(java.lang.String type)
Method to check the type of a node.
|
Edge |
nextIncomingEdge()
Returns the next incoming edge to this node.
|
Edge |
nextOutgoingEdge()
Returns the next outgoing edge from this node.
|
int |
outgoingEdgesSize()
Returns the size of the outgoing edges list.
|
void |
print()
Prints out this node.
|
void |
setObject(java.lang.Object object)
Assign an object to this node.
|
void |
startIncomingEdgeIterator()
Start iterator for incoming edges.
|
void |
startOutgoingEdgeIterator()
Start iterator for outgoing edges.
|
boolean |
validate()
Validade node.
|
public void setObject(java.lang.Object object)
object
- the object to assignpublic java.lang.Object getObject()
public void addIncomingEdge(Edge edge)
edge
- the incoming edgepublic void startIncomingEdgeIterator()
public boolean hasMoreIncomingEdges()
public Edge nextIncomingEdge()
public int incomingEdgesSize()
public void addOutgoingEdge(Edge edge)
edge
- the outgoing edgepublic void startOutgoingEdgeIterator()
public boolean hasMoreOutgoingEdges()
public Edge nextOutgoingEdge()
public int outgoingEdgesSize()
public boolean isType(java.lang.String type)
type
- to compare topublic NodeType getType()
public java.lang.String getID()
public boolean validate()
public void print()