|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectCSE115.Position
public class Position
Position.java Created: Fri Nov 22 12:23:16 2002
| Field Summary |
|---|
| Fields inherited from interface CSE115.BoardConstants |
|---|
SQUARE_SIZE |
| Constructor Summary | |
|---|---|
Position(int row,
int col)
Creates a Position object |
|
Position(Point pt)
Creates a Position object based on a given Point |
|
| Method Summary | |
|---|---|
boolean |
equals(Object obj)
|
int |
getCol()
Returns the column of this position |
int |
getRow()
Returns the row of this position |
int |
hashCode()
|
Point |
toPoint()
Coverts Position to a Point |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Position(int row,
int col)
row - the index of the row, assumes counting starting at 0col - the index of the column, assumes counting starting at 0public Position(Point pt)
pt - a Point to be translated to a row/column position| Method Detail |
|---|
public int getRow()
public int getCol()
public String toString()
toString in class Objectpublic Point toPoint()
public int hashCode()
hashCode in class Objectpublic boolean equals(Object obj)
equals in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||