public abstract class FormatHeader<P extends FormatField>
extends java.lang.Object
Modifier | Constructor and Description |
---|---|
protected |
FormatHeader() |
Modifier and Type | Method and Description |
---|---|
protected void |
addField(P field)
This method adds a field into the field list and synchronizes the field index.
|
P |
getField(int index)
This method returns the field contained at the specified index in the list of fields.
|
protected java.util.List<P> |
getFieldList()
This method returns the list of fields contained in the header.
|
int |
getIndexOfThisField(java.lang.String fieldName)
This method returns the index of a particular field.
|
int |
getNumberOfFields() |
protected int |
getNumberOfRecords()
This method returns the number of records in the file.
|
protected void |
setFieldList(java.util.List<P> fieldList)
This method sets the list of fields
|
protected void |
setNumberOfRecords(int numberOfRecords) |
protected void addField(P field)
field
- the FormatField instance to be addedprotected java.util.List<P> getFieldList()
public int getIndexOfThisField(java.lang.String fieldName)
fieldName
- the name of the fieldprotected void setFieldList(java.util.List<P> fieldList)
fieldList
- a List of FormatField instancespublic P getField(int index)
index
- the index of the field (an integer)public int getNumberOfFields()
protected int getNumberOfRecords()
protected void setNumberOfRecords(int numberOfRecords)