From fa67a247cf66ea86f6fcc773c27cfd4698d2405a Mon Sep 17 00:00:00 2001 From: "Marc G. Fournier" Date: Sat, 20 Sep 1997 02:21:25 +0000 Subject: Bring in Peter's changes...finally :( --- src/interfaces/jdbc/postgresql/PGpolygon.java | 60 +++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 src/interfaces/jdbc/postgresql/PGpolygon.java (limited to 'src/interfaces/jdbc/postgresql/PGpolygon.java') diff --git a/src/interfaces/jdbc/postgresql/PGpolygon.java b/src/interfaces/jdbc/postgresql/PGpolygon.java new file mode 100644 index 00000000000..a17ceed67fa --- /dev/null +++ b/src/interfaces/jdbc/postgresql/PGpolygon.java @@ -0,0 +1,60 @@ +/** + * + * 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