comparison flys-backend/src/main/java/de/intevation/flys/importer/XY.java @ 1204:22858e7cca79

Integrated PRF parsing into importer. Needs testing! flys-backend/trunk@2309 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Thu, 07 Jul 2011 22:25:38 +0000
parents
children 2b0426b79a92
comparison
equal deleted inserted replaced
1203:3c01bef43a98 1204:22858e7cca79
1 package de.intevation.flys.importer;
2
3 public class XY
4 implements Comparable<XY>
5 {
6 public static final double X_EPSILON = 1e-4;
7
8 protected double x;
9 protected double y;
10 protected int index;
11
12 public XY() {
13 }
14
15 public XY(double x, double y, int index) {
16 this.x = x;
17 this.y = y;
18 this.index = index;
19 }
20
21 @Override
22 public int compareTo(XY other) {
23 if (x + X_EPSILON < other.x) return -1;
24 if (x > other.x + X_EPSILON) return +1;
25 if (index < other.index) return -1;
26 if (index > other.index) return +1;
27 return 0;
28 }
29
30 public double getX() {
31 return x;
32 }
33
34 public void setX(double x) {
35 this.x = x;
36 }
37
38 public double getY() {
39 return y;
40 }
41
42 public void setY(double y) {
43 this.y = y;
44 }
45
46 public int getIndex() {
47 return index;
48 }
49
50 public void setIndex(int index) {
51 this.index = index;
52 }
53 }
54 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org