public Hashtable<IPoint,List<ILineSegment>> intersections(Iterator<ILineSegment> it){
  Collection<ILineSegment> c=new ArrayList<ILineSegment>();
  while (it.hasNext()) {
    c.add(it.next());
  }
  return intersections(c.toArray(new ILineSegment[]{}));
}

public Hashtable < IPoint , List < ILineSegment > > intersections ( Iterator < ILineSegment > it ) { Collection < ILineSegment > c = new ArrayList < ILineSegment > ( ) ; while ( it . hasNext ( ) ) { c . add ( it . next ( ) ) ; } return intersections ( c . toArray ( new ILineSegment [ ] { } ) ) ; }
compute the intersection of all segments when given an iterator of segments .
