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.SerializableLoad 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 charFIELD_NAME_SEPARATORprotected java.util.HashMap<java.lang.String,java.lang.reflect.Field>fieldByNameprotected java.lang.String[]fieldNamesprotected java.lang.StringfieldStrprotected java.lang.StringfileNameprotected booleanhasTitleprotected java.lang.Stringseparatorprotected intsizeprotected booleanverbose
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidassign(java.lang.String line, int idx)Assign values parse from 'line' into array elements indexed by 'idx'protected voidinitFields()Map field names to Field objectsvoidload()Load all data into memoryvoidsave(java.lang.String binaryFile)Save this object to a binary file (using Java serialization)intsize()Array sizejava.lang.StringtoString(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:
-
-