com.univocity.parsers.common.record
Class AbstractRecordFactory<R extends Record,M extends RecordMetaData>

java.lang.Object
  extended by com.univocity.parsers.common.record.AbstractRecordFactory<R,M>
Type Parameters:
R - the specific type of Record that is provided
Direct Known Subclasses:
RecordFactory

public abstract class AbstractRecordFactory<R extends Record,M extends RecordMetaData>
extends Object

An abstract factory class which allows subclasses to provide implementations of Record


Field Summary
protected  M metaData
           
 
Constructor Summary
AbstractRecordFactory(Context context)
          Creates a new factory of Record based the state of a parser
 
Method Summary
abstract  M createMetaData(Context context)
           
 M getRecordMetaData()
          Returns the metadata information associated with the records generated by this factory class
abstract  R newRecord(String[] data)
          Creates a new Record with a row parsed from the input
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

metaData

protected final M extends RecordMetaData metaData
Constructor Detail

AbstractRecordFactory

public AbstractRecordFactory(Context context)
Creates a new factory of Record based the state of a parser

Parameters:
context - the parser context
Method Detail

newRecord

public abstract R newRecord(String[] data)
Creates a new Record with a row parsed from the input

Parameters:
data - the row parsed from the input
Returns:
a Record that provides many utility methods for consuming the data collected for a record parsed from the input.

createMetaData

public abstract M createMetaData(Context context)

getRecordMetaData

public final M getRecordMetaData()
Returns the metadata information associated with the records generated by this factory class

Returns:
the record metadata.


Copyright © 2018 uniVocity Software Pty Ltd. All rights reserved.