|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ed.inf.graph.util.impl.EdgeSet<N,E>
public class EdgeSet<N extends IBasicNode<N,? extends IBasicEdge<N,?>>,E extends IBasicEdge<N,E>>
Constructor Summary | |
---|---|
EdgeSet()
|
Method Summary | ||
---|---|---|
boolean |
add(E edge)
|
|
boolean |
addAll(java.util.Collection<? extends E> c)
|
|
void |
clear()
|
|
boolean |
contains(E edge)
|
|
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. |
|
boolean |
contains(java.lang.Object o)
|
|
boolean |
containsAll(java.util.Collection<?> c)
|
|
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 other)
Gets the edges that contain this node as one of its ends. |
|
boolean |
hasEdgesWith(N thisNode,
N other)
Does this edge set contain one or more edges associated with this node? |
|
boolean |
isEmpty()
|
|
java.util.Iterator<E> |
iterator()
|
|
void |
remove(E edge)
|
|
boolean |
remove(java.lang.Object o)
|
|
boolean |
removeAll(java.util.Collection<?> c)
|
|
boolean |
retainAll(java.util.Collection<?> c)
|
|
int |
size()
|
|
java.lang.Object[] |
toArray()
|
|
|
toArray(T[] a)
|
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Set |
---|
equals, hashCode |
Constructor Detail |
---|
public EdgeSet()
Method Detail |
---|
public java.util.Iterator<E> iterator()
iterator
in interface java.lang.Iterable<E extends IBasicEdge<N,E>>
iterator
in interface java.util.Collection<E extends IBasicEdge<N,E>>
iterator
in interface java.util.Set<E extends IBasicEdge<N,E>>
public java.util.SortedSet<E> getEdgesWith(N thisNode, N other)
IEdgeSet
getEdgesWith
in interface IEdgeSet<N extends IBasicNode<N,? extends IBasicEdge<N,?>>,E extends IBasicEdge<N,E>>
thisNode
- the node that is the point of reference.other
- The node associated with the edges. Cannot be null.
public boolean hasEdgesWith(N thisNode, N other)
IEdgeSet
hasEdgesWith
in interface IEdgeSet<N extends IBasicNode<N,? extends IBasicEdge<N,?>>,E extends IBasicEdge<N,E>>
thisNode
- The node that is the point of reference.other
- The node to be tested. Can be null.
public boolean contains(int edgeIdx)
IEdgeSet
contains
in interface IEdgeSet<N extends IBasicNode<N,? extends IBasicEdge<N,?>>,E extends IBasicEdge<N,E>>
edgeIdx
- The edge index.
public boolean contains(E edge)
public boolean contains(N thisNode, N thatNode)
IEdgeSet
contains
in interface IEdgeSet<N extends IBasicNode<N,? extends IBasicEdge<N,?>>,E extends IBasicEdge<N,E>>
thisNode
- a node the edge may be connected to.thatNode
- another node the edge may be connected to.
public java.util.SortedSet<E> get(N thisNode, N thatNode)
IEdgeSet
get
in interface IEdgeSet<N extends IBasicNode<N,? extends IBasicEdge<N,?>>,E extends IBasicEdge<N,E>>
thisNode
- a node the edge may be connected to. Cannot be null.thatNode
- another node the edge may be connected to. Cannot be null.
public E get(int edgeIdx)
IEdgeSet
get
in interface IEdgeSet<N extends IBasicNode<N,? extends IBasicEdge<N,?>>,E extends IBasicEdge<N,E>>
edgeIdx
- The index of the edge to be obtained.
public void remove(E edge)
edge
-
java.lang.IllegalArgumentException
- if edge not in listpublic boolean add(E edge)
add
in interface java.util.Collection<E extends IBasicEdge<N,E>>
add
in interface java.util.Set<E extends IBasicEdge<N,E>>
public int size()
size
in interface java.util.Collection<E extends IBasicEdge<N,E>>
size
in interface java.util.Set<E extends IBasicEdge<N,E>>
public boolean addAll(java.util.Collection<? extends E> c)
addAll
in interface java.util.Collection<E extends IBasicEdge<N,E>>
addAll
in interface java.util.Set<E extends IBasicEdge<N,E>>
public void clear()
clear
in interface java.util.Collection<E extends IBasicEdge<N,E>>
clear
in interface java.util.Set<E extends IBasicEdge<N,E>>
public boolean contains(java.lang.Object o)
contains
in interface java.util.Collection<E extends IBasicEdge<N,E>>
contains
in interface java.util.Set<E extends IBasicEdge<N,E>>
public boolean containsAll(java.util.Collection<?> c)
containsAll
in interface java.util.Collection<E extends IBasicEdge<N,E>>
containsAll
in interface java.util.Set<E extends IBasicEdge<N,E>>
public boolean isEmpty()
isEmpty
in interface java.util.Collection<E extends IBasicEdge<N,E>>
isEmpty
in interface java.util.Set<E extends IBasicEdge<N,E>>
public boolean remove(java.lang.Object o)
remove
in interface java.util.Collection<E extends IBasicEdge<N,E>>
remove
in interface java.util.Set<E extends IBasicEdge<N,E>>
public boolean removeAll(java.util.Collection<?> c)
removeAll
in interface java.util.Collection<E extends IBasicEdge<N,E>>
removeAll
in interface java.util.Set<E extends IBasicEdge<N,E>>
public boolean retainAll(java.util.Collection<?> c)
retainAll
in interface java.util.Collection<E extends IBasicEdge<N,E>>
retainAll
in interface java.util.Set<E extends IBasicEdge<N,E>>
public java.lang.Object[] toArray()
toArray
in interface java.util.Collection<E extends IBasicEdge<N,E>>
toArray
in interface java.util.Set<E extends IBasicEdge<N,E>>
public <T> T[] toArray(T[] a)
toArray
in interface java.util.Collection<E extends IBasicEdge<N,E>>
toArray
in interface java.util.Set<E extends IBasicEdge<N,E>>
public 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 |