public class NewickScanner extends java.lang.Object implements NewickConstants
NewickStringReader
,
NewickEventReader
,
TreeReader
ALLOCATION_SEPARATOR_SYMBOL, ALLOCATION_SYMBOL, ALTERNATIVE_NAME_DELIMITER, COMMENT_END, COMMENT_START, DATA_TYPE_NEWICK_ARRAY, E_NEWICK_EDGE_TYPE_HYBRIDIZATION, E_NEWICK_EDGE_TYPE_LATERAL_GENE_TRANSFER, E_NEWICK_EDGE_TYPE_RECOMBINATION, E_NEWICK_NAMESPACE_PREFIX, E_NEWICK_NETWORK_DATA_SEPARATOR, ELEMENT_SEPERATOR, FIELD_END_SYMBOL, FIELD_START_SYMBOL, FIELD_VALUE_SEPARATOR_SYMBOL, FREE_NAME_BLANK, HOT_COMMENT_START_SYMBOL, INDEX_END_SYMBOL, INDEX_START_SYMBOL, LENGTH_SEPERATOR, NAME_DELIMITER, NEWICK_DATA_TYPE_NAMESPACE, NEWICK_FORMAT_NAME, NEWICK_NAMESPACE_PREFIX, NHX_KEY_CONFIDENCE, NHX_KEY_EVENT, NHX_KEY_GENE_NAME, NHX_KEY_PREFIX, NHX_KEY_SCIENTIFIC_NAME, NHX_KEY_SEQUENCE_ACCESSION, NHX_KEY_TAXONOMY_ID, NHX_START, NHX_VALUE_SEPARATOR_SYMBOL, PREDICATE_E_NEWICK_EDGE_TYPE, ROOTED_HOT_COMMENT, SUBTREE_END, SUBTREE_START, TERMINAL_SYMBOL, UNROOTED_HOT_COMMENT
Constructor and Description |
---|
NewickScanner(PeekReader reader,
boolean readSequence)
Creates a new instance of this class.
|
Modifier and Type | Method and Description |
---|---|
boolean |
hasMoreTokens() |
static boolean |
isCharAfterLength(char c) |
static boolean |
isFreeNameChar(char c) |
NewickToken |
nextToken() |
NewickToken |
peek() |
public NewickScanner(PeekReader reader, boolean readSequence)
reader
- the underlying reader to read the tokens fromreadSequence
- Specify true
here, if this reader shall read multiple Newick strings separated by ';' from
the underlying stream or false
if the reader shall stop at the first encountered tree end (';').public static boolean isCharAfterLength(char c)
public static boolean isFreeNameChar(char c)
public NewickToken peek() throws java.io.IOException
java.io.IOException
public boolean hasMoreTokens() throws java.io.IOException
java.io.IOException
public NewickToken nextToken() throws java.io.IOException
java.io.IOException