private EdgeRing findShell(List minEdgeRings){
  int shellCount=0;
  EdgeRing shell=null;
  for (Iterator it=minEdgeRings.iterator(); it.hasNext(); ) {
    EdgeRing er=(MinimalEdgeRing)it.next();
    if (!er.isHole()) {
      shell=er;
      shellCount++;
    }
  }
  Assert.isTrue(shellCount <= 1,"found two shells in MinimalEdgeRing list");
  return shell;
}

private EdgeRing findShell ( List minEdgeRings ) { int shellCount = 0 ; EdgeRing shell = null ; for ( Iterator it = minEdgeRings . iterator ( ) ; it . hasNext ( ) ; ) { EdgeRing er = ( MinimalEdgeRing ) it . next ( ) ; if ( ! er . isHole ( ) ) { shell = er ; shellCount ++ ; } } Assert . isTrue ( shellCount <= 1 , "found two shells in MinimalEdgeRing list" ) ; return shell ; }
this method takes a list of minimaledgerings derived from a maximaledgering , and tests whether they form a polygon . this is the case if there is a single shell in the list . in this case the shell is returned . the other possibility is that they are a series of connected holes , in which case no shell is returned .
