Generated on Thu Nov 2 14:49:35 2006 for Gecode/J by doxygen 1.5.0

Coordinate.java

Go to the documentation of this file.
00001 /* -*- indent-tabs-mode: nil -*- */
00002 /*
00003  *  Main authors:
00004  *     Marco Kuhlmann <kuhlmann@ps.uni-sb.de>
00005  *     Guido Tack <tack@gecode.org>
00006  *
00007  *  Copyright:
00008  *     Marco Kuhlmann, 2005
00009  *     Guido Tack, 2006
00010  *
00011  *  Last modified:
00012  *     $Date: 2006-10-26 11:31:58 +0200 (Thu, 26 Oct 2006) $ by $Author: tack $
00013  *     $Revision: 3796 $
00014  *
00015  *  This file is part of Gecode, the generic constraint
00016  *  development environment:
00017  *     http://www.gecode.org
00018  *
00019  *  See the file "LICENSE" for information on usage and
00020  *  redistribution of this file, and for a
00021  *     DISCLAIMER OF ALL WARRANTIES.
00022  *
00023  */
00024 
00025 package org.gecode.gist;
00026 
00027 
00028 public class Coordinate {
00029     
00030     private int x;
00031     private int y;
00032     
00033     public Coordinate() {
00034         this.x = 0;
00035         this.y = 0;
00036     }
00037     
00038     public Coordinate(int theX, int theY) {
00039         this.x = theX;
00040         this.y = theY;
00041     }
00042     
00043     public int x() {
00044         return x;
00045     }
00046     
00047     public int y() {
00048         return y;
00049     }
00050     
00051     public void set(int theX, int theY) {
00052         this.x = theX;
00053         this.y = theY;
00054     }
00055 
00056     public String toString() {
00057         return "("+x+","+y+")";
00058     }
00059 }