|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
N
- The node type that must implement this interface.E
- The edge type that must implement the IEdge
class.public interface IBasicNode<N extends IBasicNode<N,? extends IBasicEdge<N,?>>,E extends IBasicEdge<N,E>>
A basic graph node useable by all graphs.
Method Summary | |
---|---|
int |
compareTo(N other)
Compare this node to another node. |
java.util.Iterator<N> |
connectedNodeIterator()
Provides an iterator that lists all nodes connected to this node via another edge. |
java.util.Iterator<E> |
edgeIterator()
Provides an iterator that lists all edges associated with this node. |
boolean |
equals(java.lang.Object other)
Is the other node equal to this one. |
int |
getDegree()
Get the degree of the this node. |
java.util.SortedSet<E> |
getEdgesWith(N other)
Gets the edges shared with the other node. |
IBasicGraph<N,E> |
getGraph()
Get the graph that owns this node. |
int |
getIndex()
Get the index of this node. |
boolean |
hasEdgeWith(N other)
Tests whether this node shares one or more edges with another node, irrespective of the direction of that edge. |
int |
hashCode()
Get the hash code for this node. |
boolean |
isRemoved()
Has the node been removed from the graph? Nodes are not removed from the graph's data structures, but flagged as deleted. |
Method Detail |
---|
IBasicGraph<N,E> getGraph()
int getIndex()
boolean hasEdgeWith(N other)
other
- The other node to test. Can be null.
java.util.SortedSet<E> getEdgesWith(N other)
other
- The other node to test. Cannot be null.
int getDegree()
java.util.Iterator<E> edgeIterator()
java.util.Iterator<N> connectedNodeIterator()
boolean isRemoved()
boolean equals(java.lang.Object other)
equals
, and in addition
a node should be regarded as equal if its owning graph and index are identical.
equals
in class java.lang.Object
other
- the other object to be tested.
int hashCode()
equals
.
hashCode
in class java.lang.Object
int compareTo(N other)
compareTo
in interface java.lang.Comparable<N extends IBasicNode<N,? extends IBasicEdge<N,?>>>
other
- the other node to compare to.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |