Back to project page donatello-y-raphael.
The source code is released under:
MIT License
If you think the Android project donatello-y-raphael listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.example.ATracePath; //ww w .j a v a 2s. co m import android.graphics.Color; /** * Created by yngvi on 5.9.2014. */ public class Coordinate { private int m_col; private int m_row; private int color; Coordinate( int col, int row, int color ) { m_col = col; m_row = row; this.color = color; } public int getCol() { return m_col; } public int getRow() { return m_row; } public int getColor() { return color; } @Override public boolean equals( Object other ) { if ( !(other instanceof Coordinate) ) { return false; } Coordinate otherCo = (Coordinate) other; return otherCo.getCol() == this.getCol() && otherCo.getRow() == this.getRow() && this.getColor() == otherCo.getColor(); } public boolean compareTo(Coordinate other) { return this.getCol() == other.getCol() && this.getRow() == other.getRow(); } @Override public String toString() { return this.getColor() + " " + this.getCol() + "," + this.getRow(); } }