|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.joda.collect.grid.ImmutableCell<V>
V - the type of the valuepublic final class ImmutableCell<V>
Immutable implementations of the Grid.Cell data structure.
| Method Summary | ||
|---|---|---|
static
|
copyOf(Grid.Cell<? extends R> cell)
Obtains an instance of Cell. |
|
boolean |
equalRowColumn(int row,
int column)
Checks if the row-column of this cell matches the specified row and column. |
|
boolean |
equals(Object obj)
Checks if this cell equals another cell. |
|
boolean |
equalValue(Object value)
Checks if the value of this cell matches the specified value. |
|
int |
getColumn()
Gets the column index. |
|
int |
getRow()
Gets the row index. |
|
V |
getValue()
Gets the value of the cell. |
|
int |
hashCode()
Gets a suitable hash code. |
|
static
|
of(int row,
int column,
R value)
Obtains an instance of Cell. |
|
String |
toString()
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public static <R> ImmutableCell<R> of(int row,
int column,
R value)
Cell.
R - the type of the valuerow - the row, zero or greatercolumn - the column, zero or greatervalue - the value to put into the grid, not null
IndexOutOfBoundsException - if either index is less than zeropublic static <R> ImmutableCell<R> copyOf(Grid.Cell<? extends R> cell)
Cell.
R - the type of the valuecell - the cell to copy, not null
public int getRow()
Grid.Cell
getRow in interface Grid.Cell<V>public int getColumn()
Grid.Cell
getColumn in interface Grid.Cell<V>public V getValue()
Grid.Cell
getValue in interface Grid.Cell<V>
public boolean equalRowColumn(int row,
int column)
Grid.Cell
equalRowColumn in interface Grid.Cell<V>row - the row to checkcolumn - the column to check
public boolean equalValue(Object value)
Grid.Cell
equalValue in interface Grid.Cell<V>value - the row to check, null returns false
public boolean equals(Object obj)
Grid.CellTwo cells are equal if they have equal row, column and value.
equals in interface Grid.Cell<V>equals in class Objectobj - the object to compare to, null returns false
public int hashCode()
Grid.Cell
The hash code is row ^ Integer.rotateLeft(column, 16) ^ value.hashCode().
hashCode in interface Grid.Cell<V>hashCode in class Objectpublic String toString()
toString in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||