public class MatrixModel extends java.lang.Object implements EventHandler
After parsing data is available as
Modifier and Type | Field and Description |
---|---|
private java.util.List<java.lang.String[]> |
data |
private int |
numColumns |
Constructor and Description |
---|
MatrixModel()
Create a new annotation model.
|
Modifier and Type | Method and Description |
---|---|
void |
addRow(java.lang.String... row)
Add a row of data to the model.
|
int |
getColumnCount()
Get the number of columns.
|
java.lang.String |
getData(int rowIndex,
int colIndex)
Get the data element at a given row and column index.
|
java.lang.String[] |
getRowByIndex(int rowIndex) |
int |
getRowCount()
Get the number of rows.
|
<T> void |
handleEvent(EventType<T> eventType,
T eventData,
BfsParser parser)
The method is called by the parser when it has found something
interesting in a BFS file.
|
public <T> void handleEvent(EventType<T> eventType, T eventData, BfsParser parser)
EventHandler
It is recommended that event handlers ignore event types they don't know about.
handleEvent
in interface EventHandler
eventType
- The type of event. See the parser documentation
for more information about the event types it generateseventData
- The data that is associated with the eventparser
- The parser that is resposible for parsing the filepublic void addRow(java.lang.String... row)
public int getColumnCount()
public int getRowCount()
public java.lang.String getData(int rowIndex, int colIndex)
rowIndex
- The row index, a value between 0 and
getRowCount()
-1colIndex
- The column index, a value between
0 and getColumnCount()
-1public java.lang.String[] getRowByIndex(int rowIndex)