package org.ntlab.acanthus_client.entities;

//-----------------------------------------------------------------
// ペン座標
public class Position implements Comparable {
    private int i;
    private Float x;
    private Float y;

    //-----------------------------------------------------------------
    // getter
    public int getI() {
        return this.i;
    }

    public Float getX() {
        return this.x;
    }

    public Float getY() {
        return this.y;
    }

    //-----------------------------------------------------------------
    // setter
    public void setPosition(int i, float x, float y) {
        this.i = i;
        this.x = x;
        this.y = y;
    }

    //-----------------------------------------------------------------
    //
    @Override
    public int compareTo(Object o) {
        if (o instanceof Position) {
            if (i < ((Position) o).i) {
                return -1;
            } else if (i > ((Position) o).i) {
                return 1;
            }
        }
        return 0;
    }
}
