|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
N
- The node class to be used. It must implement INode
.E
- The edge class to be used. It must implement IEdge
.public interface IEdgeSet<N extends IBasicNode<N,? extends IBasicEdge<N,?>>,E extends IBasicEdge<N,E>>
A set designed to provide convenient access to edges. This interface will typically be implemented and used
as a data structure with the graph library classes themselves rather than by clients of the library. The
set does not ensure that the edges all belong to the same graph (although this is recommended and the client should ensure this),
it only requires that the edge indexes are unique, based on equals()
and their comparitor.
Method Summary | |
---|---|
boolean |
contains(int edgeIdx)
Does an edge with this index exist in the set. |
boolean |
contains(N thisNode,
N thatNode)
Does the edge set contain at least one edge with these nodes. |
E |
get(int edgeIdx)
Get the edge with the given index. |
java.util.SortedSet<E> |
get(N thisNode,
N thatNode)
Get the edges that match the given node connectivity. |
java.util.SortedSet<E> |
getEdgesWith(N thisNode,
N otherNode)
Gets the edges that contain this node as one of its ends. |
boolean |
hasEdgesWith(N thisNode,
N otherNode)
Does this edge set contain one or more edges associated with this node? |
Methods inherited from interface java.util.Set |
---|
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray |
Method Detail |
---|
boolean contains(N thisNode, N thatNode)
thisNode
- a node the edge may be connected to.thatNode
- another node the edge may be connected to.
java.util.SortedSet<E> get(N thisNode, N thatNode)
thisNode
- a node the edge may be connected to. Cannot be null.thatNode
- another node the edge may be connected to. Cannot be null.
java.lang.NullPointerException
- if the parameters are null.
java.lang.IllegalArgumentException
- if contains(N thisNode, N thatNode) == false
boolean hasEdgesWith(N thisNode, N otherNode)
thisNode
- The node that is the point of reference.otherNode
- The node to be tested. Can be null.
java.util.SortedSet<E> getEdgesWith(N thisNode, N otherNode)
thisNode
- the node that is the point of reference.otherNode
- The node associated with the edges. Cannot be null.
java.lang.NullPointerException
- of node is null.
java.lang.IllegalArgumentException
- if hasEdgesWith(node) == false
.boolean contains(int edgeIdx)
edgeIdx
- The edge index.
E get(int edgeIdx)
edgeIdx
- The index of the edge to be obtained.
java.lang.IllegalArgumentException
- if contains(edgeIdx) == false
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |