/** * * This implements a polygon (based on java.awt.Polygon) * */ package postgresql; import java.io.*; import java.sql.*; public class PGpolygon implements Serializable { public int npoints; public PGpoint point[]; public PGpolygon(int num,PGpoint[] points) { npoints = num; this.point = points; } /** * This constructor is used by the driver. */ public PGpolygon(String s) throws SQLException { PGtokenizer t = new PGtokenizer(PGtokenizer.removePara(s),','); npoints = t.getSize(); point = new PGpoint[npoints]; for(int p=0;p