T - Data type of Entry payload.public class Matrix<T> extends Object
Every cell in the Matrix is backed by an Entry<T>.
| Modifier and Type | Class and Description |
|---|---|
static class |
Matrix.Arrow |
static class |
Matrix.Entry<T> |
| Constructor and Description |
|---|
Matrix() |
| Modifier and Type | Method and Description |
|---|---|
List<List<Matrix.Entry<T>>> |
get()
Returns the datastore.
|
List<Matrix.Entry<T>> |
get(int rowPos)
Returns the specified row.
|
Matrix.Entry<T> |
get(int rowPos,
int colPos)
Fetches an Entry at the specified row and column position.
|
Set<T> |
getCellDataAsSet()
Fetches all cell data and returns as Set
|
int |
getMaxRowWidth() |
long |
getNumberOfCells() |
boolean |
isEmpty() |
void |
put(int rowPos,
int colPos,
Matrix.Entry<T> value)
Puts an Entry at the specified row and column position.
|
public List<List<Matrix.Entry<T>>> get()
public List<Matrix.Entry<T>> get(int rowPos)
rowPos - row index.public Matrix.Entry<T> get(int rowPos, int colPos)
rowPos - row indexcolPos - column indexpublic int getMaxRowWidth()
public boolean isEmpty()
public Set<T> getCellDataAsSet()
public long getNumberOfCells()
public void put(int rowPos,
int colPos,
@Nullable
Matrix.Entry<T> value)
Rows and columns will expand to match the specified coordinates. Empty cells will be filled with nulls.
rowPos - row indexcolPos - col indexvalue - Entry to storeCopyright © 2016–2019. All rights reserved.