Package pt.ist.phylolib.data.dataset
Class DatasetParser
java.lang.Object
pt.ist.phylolib.data.dataset.DatasetParser
public abstract class DatasetParser extends java.lang.Object implements IReader<Dataset>
Responsible for parsing
phylogenetic datasets from Strings.-
Field Summary
-
Constructor Summary
Constructors Constructor Description DatasetParser() -
Method Summary
Modifier and Type Method Description protected voidinit(java.util.Iterator<java.lang.String> iterator)Initializes the state of the processor by parsing the first lines of the dataset.protected abstract Profileparse(java.util.Iterator<java.lang.String> iterator)Parses one profile from the given Strings.Datasetparse(java.util.stream.Stream<java.lang.String> data)Parses the input data into an object.
-
Constructor Details
-
DatasetParser
public DatasetParser()
-
-
Method Details
-
parse
Description copied from interface:IReaderParses the input data into an object. -
init
protected void init(java.util.Iterator<java.lang.String> iterator)Initializes the state of the processor by parsing the first lines of the dataset.By default does not parse anything.
- Parameters:
iterator- the iterator containing the lines of the dataset
-
parse
Parses one profile from the given Strings.- Parameters:
iterator- the iterator containing the lines of the dataset- Returns:
- a new profile resultant from parsing lines of the dataset
-