|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IBasicEdgeFactory<N extends IBasicNode<N,? extends IBasicEdge<N,?>>,E extends IBasicEdge<N,E>>
Method Summary | |
---|---|
boolean |
canCreateEdge()
Tests is all the conditions have been met in the factory so that edge creation will succeed. |
E |
createEdge()
Create a new edge and add it to the graph. |
IBasicPair<N,E> |
getCurrentNodePair()
Returns the current node pair, or false if no nodes have been set. |
IBasicGraph<N,E> |
getGraph()
Get the graph to which this factory acts upon. |
boolean |
isValidNodePair(N thisNode,
N thatNode)
Test if the node pair is valid. |
void |
setPair(N thisNode,
N thatNode)
Sets a pair of nodes with which to create a new edge. |
Method Detail |
---|
IBasicGraph<N,E> getGraph()
void setPair(N thisNode, N thatNode)
thisNode
- a node in the edge pair, cannot be null.thatNode
- another node in the edge pair, cannot be null.
java.lang.IllegalArgumentException
- if isValidNodePair(thisNode, thatNode) == false
.boolean isValidNodePair(N thisNode, N thatNode)
getGraph()
, do both nodes belong to the same
graph and are both nodes not null.
thisNode
- a node that may be the end of an edge.thatNode
- another node that may be the end of an edge.
IBasicPair<N,E> getCurrentNodePair()
setPair(thisNode, thatNode)
has not
been called.boolean canCreateEdge()
isValidNodePair(thisNode, thatNode)
should be true.
E createEdge()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |