public Edge findEdge(Coordinate p0,Coordinate p1){
  for (int i=0; i < edges.size(); i++) {
    Edge e=(Edge)edges.get(i);
    Coordinate[] eCoord=e.getCoordinates();
    if (p0.equals(eCoord[0]) && p1.equals(eCoord[1]))     return e;
  }
  return null;
}

public Edge findEdge ( Coordinate p0 , Coordinate p1 ) { for ( int i = 0 ; i < edges . size ( ) ; i ++ ) { Edge e = ( Edge ) edges . get ( i ) ; Coordinate [ ] eCoord = e . getCoordinates ( ) ; if ( p0 . equals ( eCoord [ 0 ] ) && p1 . equals ( eCoord [ 1 ] ) ) return e ; } return null ; }
returns the edge whose first two coordinates are p0 and p1
