Subversion Repositories display

Rev

Rev 370 | Blame | Compare with Previous | Last modification | View Log | RSS feed

/*
 * Copyright (C) 2014 Steve Ratcliffe
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 3 or
 * version 2 as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 */

package test.files;

import uk.me.parabola.imgfmt.app.Coord;

/**
 * @author Steve Ratcliffe
 */

public class CoordLocator {
        private int segmentNumber; // The segment number
        private int coordNumber;   // The coordinate within the segment
        private Coord coord;
        private int coordsInSegment; // Number of coords in the segment.

        public int getSegmentNumber() {
                return segmentNumber;
        }

        public void setSegmentNumber(int segmentNumber) {
                this.segmentNumber = segmentNumber;
        }

        public int getCoordNumber() {
                return coordNumber;
        }

        public void setCoordNumber(int coordNumber) {
                this.coordNumber = coordNumber;
        }

        public void setCoord(Coord coord) {
                this.coord = coord;
        }

        public Coord getCoord() {
                return coord;
        }

        public void setCoordsInSegment(int coordsInSegment) {
                this.coordsInSegment = coordsInSegment;
        }

        public int getCoordsInSegment() {
                return coordsInSegment;
        }

        public boolean isLastInSegment() {
                return coordNumber == coordsInSegment-1;
        }
}