public void computeRing(){
  if (ring != null)   return;
  Coordinate[] coord=new Coordinate[pts.size()];
  for (int i=0; i < pts.size(); i++) {
    coord[i]=(Coordinate)pts.get(i);
  }
  ring=geometryFactory.createLinearRing(coord);
  isHole=CGAlgorithms.isCCW(ring.getCoordinates());
}

public void computeRing ( ) { if ( ring != null ) return ; Coordinate [ ] coord = new Coordinate [ pts . size ( ) ] ; for ( int i = 0 ; i < pts . size ( ) ; i ++ ) { coord [ i ] = ( Coordinate ) pts . get ( i ) ; } ring = geometryFactory . createLinearRing ( coord ) ; isHole = CGAlgorithms . isCCW ( ring . getCoordinates ( ) ) ; }
compute a linearring from the point list previously collected . test if the ring is a hole ( i . e . if it is ccw ) and set the hole flag accordingly .
