package vnt;
/**
 * Coordinate.java - v1.0
 * Began: June 30, 2005
 * Last Updated: July 21, 2005 
 * 
 * Copyright (C) 2005 - Michael D. Miller - mdm162@truman.edu
 * Truman State University
 * 100 E. Normal
 * Kirksville, MO - 63501
 * 
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 * 
 * 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.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
 */

/**
 * <p>A class that holds the X,Y, and grayscale color value of a pixel.
 * Needed for the Stack class's Object manipulation requirements.
 * This class allows for the storage of invalid x and y coordinates.</p>
 *  
 * @author Michael Miller - Truman State University
 * @version 1.0
 * @since 1.0
 */
class Coordinate {
    
    private int x;
    private int y;
    private int color;
    
    /**
     * Initializes the class with the given information.
     *
     * <p>Pre: none
     * <br />Post: This class is initialized. 
     * @param myX The x-coordinate of the pixel.
     * @param myY The y-coordinate of the pixel.
     * @param myColor The grayscale color value of the pixel.
     */
    public Coordinate (int myX, int myY, int myColor) {
        x = myX;
        y = myY;
        color = myColor;
    }

    /**
     * Accessor for X variable.
     * <p>Pre: This method is always safe on an instantianted class.
     * <br />Post: No changes.
     * @return x pixel coordinate value
     */ 
    public int getX() {
        return x;
    }

    /**
     * Accessor for Y variable.
     * <p>Pre: This method is always safe on an instantianted class.
     * <br />Post: No changes.
     * @return y pixel coordinate value
     */ 
    public int getY() {
        return y;
    }

    /**
     * Accessor for color variable.
     * <p>Pre: This method is always safe on an instantianted class.
     * <br />Post: No changes.
     * @return color grayscale color value
     */ 
    public int getColor() {
        return color;
    }
}