|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object utilities.Position
public class Position
Position.java Created: Fri Nov 22 12:23:16 2002
Field Summary |
---|
Fields inherited from interface utilities.IBoardConstants |
---|
SQUARE_SIZE |
Constructor Summary | |
---|---|
Position(java.lang.Integer row,
java.lang.Integer col)
Creates a Position object |
|
Position(java.awt.Point pt)
Creates a Position object based on a given Point |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
Tests to see if the given object has the same row and column values as this position |
java.awt.Point |
getCenterLocation()
Coverts Position to a Point |
java.lang.Integer |
getCol()
Returns the column of this position |
java.lang.Integer |
getRow()
Returns the row of this position |
int |
hashCode()
Generates a hashcode so that two position objects with the same row and column values will have the same hashcode |
java.awt.Point |
toPoint()
Coverts Position to a Point |
java.lang.String |
toString()
Returns a string representation of this Position |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Position(java.lang.Integer row, java.lang.Integer col)
row
- the index of the row, assumes counting starting at 0col
- the index of the column, assumes counting starting at 0public Position(java.awt.Point pt)
pt
- a Point to be translated to a row/column positionMethod Detail |
---|
public java.lang.Integer getRow()
public java.lang.Integer getCol()
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public java.awt.Point toPoint()
public java.awt.Point getCenterLocation()
public int hashCode()
hashCode
in class java.lang.Object
Object.hashCode()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- the object to test for equivalence
Object.equals(java.lang.Object)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |