|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdiva.util.BasicPropertyContainer
diva.graph.basic.BasicGraphModel.Intermediate
diva.graph.basic.BasicGraphModel.BasicEdge
private static class BasicGraphModel.BasicEdge
A basic implementation of the Edge interface.
Field Summary | |
---|---|
private boolean |
_directed
Whether or not this edge is directed. |
private Node |
_head
The head of the edge. |
private Node |
_tail
The tail of the edge. |
Constructor Summary | |
---|---|
BasicGraphModel.BasicEdge(java.lang.Object userObject)
Create a new edge with the specified user object but no tail or head. |
|
BasicGraphModel.BasicEdge(java.lang.Object userObject,
Node tail,
Node head)
Create a new edge with the specified user object and tail/head |
Method Summary | |
---|---|
boolean |
acceptHead(Node head)
Return whether or not the given node is a valid head of this edge. |
boolean |
acceptTail(Node tail)
Return whether or not the given node is a valid tail of this edge. |
Node |
getHead()
Return the node at the head of this edge. |
Node |
getTail()
Return the node at the tail of this edge. |
boolean |
isDirected()
Return whether or not this edge is directed. |
void |
setHead(Node n)
Set the node that this edge points to. |
void |
setTail(Node n)
Set the node that this edge stems from. |
java.lang.String |
toString()
Print a readable description of this edge |
Methods inherited from class diva.graph.basic.BasicGraphModel.Intermediate |
---|
getSemanticObject, setSemanticObject |
Methods inherited from class diva.util.BasicPropertyContainer |
---|
getProperty, properties, propertyNames, removeAllProperties, setProperty |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface diva.util.SemanticObjectContainer |
---|
getSemanticObject, setSemanticObject |
Methods inherited from interface diva.util.PropertyContainer |
---|
getProperty, propertyNames, setProperty |
Field Detail |
---|
private boolean _directed
private Node _head
private Node _tail
Constructor Detail |
---|
public BasicGraphModel.BasicEdge(java.lang.Object userObject)
public BasicGraphModel.BasicEdge(java.lang.Object userObject, Node tail, Node head)
Method Detail |
---|
public boolean acceptHead(Node head)
Edge
acceptHead
in interface Edge
public boolean acceptTail(Node tail)
Edge
acceptTail
in interface Edge
public Node getHead()
Edge
getHead
in interface Edge
public Node getTail()
Edge
getTail
in interface Edge
public boolean isDirected()
Edge
isDirected
in interface Edge
public void setHead(Node n)
Edge
setHead
in interface Edge
public void setTail(Node n)
Edge
setTail
in interface Edge
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |