info.bioinfweb.jphyloio.formats.newick

## Class NewickScanner

- java.lang.Object
- - info.bioinfweb.jphyloio.formats.newick.NewickScanner

- All Implemented Interfaces:
    NewickConstants

      public class NewickScanner
      extends java.lang.Object
      implements NewickConstants

  Reads Newick tokens from a stream. (This class is used internally by JPhyloIO reader reading Newick tree definitions.)
  Author:
    Ben Stöver
  See Also:
    `NewickStringReader`, `NewickEventReader`, `TreeReader`

- - ### Field Summary

    - ### Fields inherited from interface info.bioinfweb.jphyloio.formats.newick.NewickConstants

      `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 Summary

    Constructors
    Constructor and Description
    `NewickScanner(PeekReader reader, boolean readSequence)` Creates a new instance of this class.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `hasMoreTokens()`
    `static boolean` | `isCharAfterLength(char c)`
    `static boolean` | `isFreeNameChar(char c)`
    `NewickToken` | `nextToken()`
    `NewickToken` | `peek()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### NewickScanner

          public NewickScanner(PeekReader reader,
                               boolean readSequence)

      Creates a new instance of this class.
      Parameters:
        `reader` - the underlying reader to read the tokens from
        `readSequence` - 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 (';').

  - ### Method Detail

    - #### isCharAfterLength

          public static boolean isCharAfterLength(char c)

    - #### isFreeNameChar

          public static boolean isFreeNameChar(char c)

    - #### peek

          public NewickToken peek()
                           throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### hasMoreTokens

          public boolean hasMoreTokens()
                                throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### nextToken

          public NewickToken nextToken()
                                throws java.io.IOException

      Throws:
        `java.io.IOException`