|
MATES 3.0-rc2 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.mates.util.Grid
A class for storing objects in a grid or matrix.
Constructor Summary | |
Grid()
Creates a grid with one row and one column. |
|
Grid(int num_rows,
int num_columns)
Creates a grid. |
Method Summary | |
void |
clear()
Removes all of the elements from the grid. |
boolean |
columnIsFuzzy(java.lang.Object object)
Returns whether the current column is definite or "fuzzy". |
int |
getColumn(java.lang.Object object)
Returns the column of an object in the grid. |
int |
getNumColumns()
Returns the current number of columns in the grid. |
int |
getNumRows()
Returns the current number of rows in the grid. |
int |
getRow(java.lang.Object object)
Returns the row of an object in the grid. |
void |
put(int row,
int column,
java.lang.Object object)
Inserts a new element into this grid. |
void |
remove(java.lang.Object object)
Removes an element from the grid. |
boolean |
rowIsFuzzy(java.lang.Object object)
Returns whether the current row is definite or "fuzzy". |
void |
setColFuzzy(java.lang.Object object,
boolean fuzzy)
Sets the fuzzy state of an object's column. |
void |
setNumColumns(int new_num_columns)
Sets the number of columns in the grid. |
void |
setNumRows(int new_num_rows)
Sets the number of rows in the grid. |
void |
setRowFuzzy(java.lang.Object object,
boolean fuzzy)
Sets the fuzzy state of an object's row. |
int |
size()
Returns the number of elements in the grid. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Grid()
public Grid(int num_rows, int num_columns)
num_rows
- the number of rows for this gridnum_columns
- the number of columns for this gridMethod Detail |
public void put(int row, int column, java.lang.Object object)
row
- the row of the objectcolumn
- the column of the objectobject
- the object to be inserted or movedpublic boolean rowIsFuzzy(java.lang.Object object)
true
if and only if the current object's
row is fuzzy. Returns false
if the object is not
in the grid.public boolean columnIsFuzzy(java.lang.Object object)
true
if and only if the current object's
column is fuzzy. Returns false
if the object is not
in the grid.public void setRowFuzzy(java.lang.Object object, boolean fuzzy)
public void setColFuzzy(java.lang.Object object, boolean fuzzy)
public int getRow(java.lang.Object object)
object
; -1
on error.public int getColumn(java.lang.Object object)
object
; -1
on error.public int getNumRows()
public int getNumColumns()
public int size()
public void clear()
public void setNumRows(int new_num_rows)
public void setNumColumns(int new_num_columns)
public void remove(java.lang.Object object)
|
MATES 3.0-rc2 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |