com.mindbright.terminal.tandem6530
public class Position extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected int |
col |
protected int |
row |
protected boolean |
wrap |
Constructor and Description |
---|
Position(int row,
int col) |
Position(int row,
int col,
boolean wrap) |
Position(Position p) |
Position(Position p,
boolean wrap) |
Modifier and Type | Method and Description |
---|---|
int |
abs(int cols) |
Position |
decCol(int rows,
int cols) |
Position |
decRow(int rows,
int cols) |
boolean |
equals(java.lang.Object o) |
int |
getCol() |
int |
getRow() |
int |
hashCode() |
Position |
incCol(int rows,
int cols) |
Position |
incRow(int rows,
int cols) |
boolean |
le(Position other)
Returns true if I'm less than or equal to other
|
void |
limit(int rows,
int cols) |
boolean |
lt(Position other)
Returns true if I'm less than other
|
Position |
set(int row,
int col) |
Position |
set(Position p) |
Position |
setCol(int col) |
Position |
setRow(int row) |
java.lang.String |
toString() |
public Position(Position p)
public Position(Position p, boolean wrap)
public Position(int row, int col)
public Position(int row, int col, boolean wrap)
public Position set(int row, int col)
public int getRow()
public Position setRow(int row)
public int getCol()
public Position setCol(int col)
public Position decCol(int rows, int cols)
public Position incCol(int rows, int cols)
public Position decRow(int rows, int cols)
public Position incRow(int rows, int cols)
public boolean lt(Position other)
public boolean le(Position other)
public int abs(int cols)
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public void limit(int rows, int cols)
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object