private List buildEdgeRings(Collection dirEdges){
  List edgeRings=new ArrayList();
  for (Iterator it=dirEdges.iterator(); it.hasNext(); ) {
    DirectedEdge de=(DirectedEdge)it.next();
    if (de.isInResult() && de.getEdgeRing() == null) {
      MaximalEdgeRing er=new MaximalEdgeRing(de,geometryFactory);
      er.linkDirectedEdgesForMinimalEdgeRings();
      List minEdgeRings=er.buildMinimalRings();
      edgeRings.addAll(minEdgeRings);
    }
  }
  return edgeRings;
}

private List buildEdgeRings ( Collection dirEdges ) { List edgeRings = new ArrayList ( ) ; for ( Iterator it = dirEdges . iterator ( ) ; it . hasNext ( ) ; ) { DirectedEdge de = ( DirectedEdge ) it . next ( ) ; if ( de . isInResult ( ) && de . getEdgeRing ( ) == null ) { MaximalEdgeRing er = new MaximalEdgeRing ( de , geometryFactory ) ; er . linkDirectedEdgesForMinimalEdgeRings ( ) ; List minEdgeRings = er . buildMinimalRings ( ) ; edgeRings . addAll ( minEdgeRings ) ; } } return edgeRings ; }
form directededges in graph into minimal edgerings . ( minimal edgerings must be used , because only they are guaranteed to provide a correct ishole computation )
