|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| 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 Edgepublic boolean acceptTail(Node tail)
Edge
acceptTail in interface Edgepublic Node getHead()
Edge
getHead in interface Edgepublic Node getTail()
Edge
getTail in interface Edgepublic boolean isDirected()
Edge
isDirected in interface Edgepublic void setHead(Node n)
Edge
setHead in interface Edgepublic void setTail(Node n)
Edge
setTail in interface Edgepublic 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 | ||||||||