AbstractBaseGraph#getEdge(V,V)
returns a single E. How does it decide which edge to return if the two vertices passed have more than one connecting edge?
If there are multiple edges, it looks like only one is returned:
public E getEdge(V sourceVertex, V targetVertex){
...
Iterator<E> iter =
getEdgeContainer(sourceVertex).vertexEdges.iterator();
while (iter.hasNext()) {
E e = iter.next();
...
The first legal edge (having source and target vertexes equal to the args) is returned. Since the iterator (based on a Map data structure) makes no gaurentee of the order that the components will be returned, it is not possible to be certain which edge will be returned. If you need to examine and choose a specific edge, you should probably use getAllEdges(V sourceVertex, V targetVertex)
.