|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.basedb.util.bfs.MatrixModel
public class MatrixModel
A model container for BFS data files. This class is primarily intended to be used when parsing small data files. It is not recommended to use this class with large files since it may use too much memory.
After parsing data is available as
Field Summary | |
---|---|
private List<String[]> |
data
|
private int |
numColumns
|
Constructor Summary | |
---|---|
MatrixModel()
Create a new annotation model. |
Method Summary | ||
---|---|---|
void |
addRow(String... row)
Add a row of data to the model. |
|
int |
getColumnCount()
Get the number of columns. |
|
String |
getData(int rowIndex,
int colIndex)
Get the data element at a given row and column index. |
|
String[] |
getRowByIndex(int rowIndex)
|
|
int |
getRowCount()
Get the number of rows. |
|
|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private List<String[]> data
private int numColumns
Constructor Detail |
---|
public MatrixModel()
Method Detail |
---|
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(String... row)
public int getColumnCount()
public int getRowCount()
public 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()
-1
public String[] getRowByIndex(int rowIndex)
|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |