|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.unihalle.informatik.MiToBo.core.datatypes.MTBGraphNode<T>
T
- Type parameter of MTBGraphNode. Possible choices are Point, Point2D,
Integer, etc.public class MTBGraphNode<T>
Class implements MTBGraphNodes for the MTBGraph. Each MTBGraphNode has data and incoming and outgoing edges. If the edge is undirected, there is no difference between incoming and outgoing edges.
MTBGraphEdge
Field Summary | |
---|---|
protected T |
data
MTBGraphNode data. |
protected java.util.Vector<MTBGraphEdge> |
inEdges
Vector of incoming edges of the MTBGraphNode. |
protected java.util.Vector<MTBGraphEdge> |
outEdges
Vector of outgoing edges of the MTBGraphNode. |
Constructor Summary | |
---|---|
MTBGraphNode(T data)
Constructor to create a new MTBGraphNode object. |
Method Summary | |
---|---|
protected void |
addInEdge(MTBGraphEdge inEdge)
Add a incoming MTBGraphEdge to the MTBGraphNode |
protected void |
addOutEdge(MTBGraphEdge outEdge)
Add a outgoing MTBGraphEdge to the MTBGraphNode |
java.util.Vector<MTBGraphEdge> |
getAllEdges()
Get all edges of the node. |
T |
getData()
Get data of MTBGraphNode. |
java.util.Vector<MTBGraphEdge> |
getInEdges()
Get input edges for node. |
java.util.Vector<MTBGraphNode<T>> |
getNeighbors()
Get all neighbors of the current node. |
int |
getNumberOfInEdges()
Get number of incoming edges for MTBGraphNode. |
int |
getNumberOfOutEdges()
Get number of outgoing edges for MTBGraphNode. |
java.util.Vector<MTBGraphEdge> |
getOutEdges()
Get outgoing edges for node. |
int |
getTotalNumberOfEdges()
Get total number of edges for MTBGraphNode. |
protected void |
removeInEdge(MTBGraphEdge inEdge)
Remove a incoming MTBGraphEdge from the MTBGraphNode. |
protected void |
removeOutEdge(MTBGraphEdge outEdge)
Remove a outgoing MTBGraphEdge from the MTBGraphNode. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected T data
protected java.util.Vector<MTBGraphEdge> inEdges
protected java.util.Vector<MTBGraphEdge> outEdges
Constructor Detail |
---|
public MTBGraphNode(T data)
data
- data of the MTBGraphNodeMethod Detail |
---|
protected void addInEdge(MTBGraphEdge inEdge)
inEdge
- incoming MTBGraphEdge to addprotected void addOutEdge(MTBGraphEdge outEdge)
outEdge
- outgoing MTBGraphEdge to addpublic java.util.Vector<MTBGraphEdge> getAllEdges()
public T getData()
public java.util.Vector<MTBGraphEdge> getInEdges()
public java.util.Vector<MTBGraphNode<T>> getNeighbors()
public int getNumberOfInEdges()
public int getNumberOfOutEdges()
public java.util.Vector<MTBGraphEdge> getOutEdges()
public int getTotalNumberOfEdges()
protected void removeInEdge(MTBGraphEdge inEdge)
inEdge
- input edge to removeprotected void removeOutEdge(MTBGraphEdge outEdge)
outEdge
- outgoing edge to removepublic 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 |