view flys-backend/src/main/java/de/intevation/flys/importer/XY.java @ 2817:8979f2294af9

Finished parsing MINFO specific sediment density. flys-backend/trunk@4234 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Fri, 13 Apr 2012 11:45:29 +0000
parents 22858e7cca79
children 2b0426b79a92
line wrap: on
line source
package de.intevation.flys.importer;

public class XY
implements   Comparable<XY>
{
    public static final double X_EPSILON = 1e-4;

    protected double x;
    protected double y;
    protected int    index;

    public XY() {
    }

    public XY(double x, double y, int index) {
        this.x     = x;
        this.y     = y;
        this.index = index;
    }

    @Override
    public int compareTo(XY other) {
        if (x + X_EPSILON < other.x) return -1;
        if (x > other.x + X_EPSILON) return +1;
        if (index < other.index)     return -1;
        if (index > other.index)     return +1;
        return 0;
    }

    public double getX() {
        return x;
    }

    public void setX(double x) {
        this.x = x;
    }

    public double getY() {
        return y;
    }

    public void setY(double y) {
        this.y = y;
    }

    public int getIndex() {
        return index;
    }

    public void setIndex(int index) {
        this.index = index;
    }
}
// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org