Package org.snpeff.fileIterator
Class TableFile
- java.lang.Object
-
- org.snpeff.fileIterator.TableFile
-
- All Implemented Interfaces:
java.io.Serializable
public class TableFile extends java.lang.Object implements java.io.Serializable
Load a table from a file. The table is loaded into an arbitrary object having arrays to hold the data.- Author:
- pcingola
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected static char
FIELD_NAME_SEPARATOR
protected java.util.HashMap<java.lang.String,java.lang.reflect.Field>
fieldByName
protected java.lang.String[]
fieldNames
protected java.lang.String
fieldStr
protected java.lang.String
fileName
protected boolean
hasTitle
protected java.lang.String
separator
protected int
size
protected boolean
verbose
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
assign(java.lang.String line, int idx)
Assign values parse from 'line' into array elements indexed by 'idx'protected void
initFields()
Map field names to Field objectsvoid
load()
Load all data into memoryvoid
save(java.lang.String binaryFile)
Save this object to a binary file (using Java serialization)int
size()
Array sizejava.lang.String
toString(int index)
Return line number 'index' as a string
-
-
-
Field Detail
-
FIELD_NAME_SEPARATOR
protected static final char FIELD_NAME_SEPARATOR
- See Also:
- Constant Field Values
-
size
protected int size
-
verbose
protected boolean verbose
-
hasTitle
protected boolean hasTitle
-
fileName
protected java.lang.String fileName
-
separator
protected java.lang.String separator
-
fieldStr
protected java.lang.String fieldStr
-
fieldNames
protected java.lang.String[] fieldNames
-
fieldByName
protected java.util.HashMap<java.lang.String,java.lang.reflect.Field> fieldByName
-
-
Method Detail
-
assign
protected void assign(java.lang.String line, int idx)
Assign values parse from 'line' into array elements indexed by 'idx'- Parameters:
line
-idx
-
-
initFields
protected void initFields()
Map field names to Field objects
-
load
public void load()
Load all data into memory
-
save
public void save(java.lang.String binaryFile)
Save this object to a binary file (using Java serialization)- Parameters:
binaryFile
-
-
size
public int size()
Array size- Returns:
-
toString
public java.lang.String toString(int index)
Return line number 'index' as a string- Parameters:
index
-- Returns:
-
-