Class RecordFactory<T extends Record>
java.lang.Object
com.github.jamesross03.pop_parser.utils.RecordFactory<T>
- Type Parameters:
T
- subclass ofRecord
abstract class
- Direct Known Subclasses:
BirthRecordFactory
Abstract factory class for making objects of
Record
subclass
T
from a line of CSV input.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionRecordFactory
(RecordFormat format) Instialises a new instance of aRecordFactory
subclass for use with a givenRecordFormat
instance. -
Method Summary
-
Field Details
-
format
Structure of records being input.
-
-
Constructor Details
-
RecordFactory
Instialises a new instance of aRecordFactory
subclass for use with a givenRecordFormat
instance.- Parameters:
format
- record format to use
-
-
Method Details
-
makeRecord
Takes a map of attribute names and their corresponding values, representing a line read in from a record file, and uses them to create a newRecord
object of subclassT
.- Parameters:
entry
- Map of <key, value> pairs from a line of input- Returns:
- generated
T
instance
-