com.io7m.smfj.format.text

## Class SMFTLineReaderList

- java.lang.Object
- - com.io7m.smfj.format.text.SMFTLineReaderList

- All Implemented Interfaces:
    SMFTLineReaderType

      public final class SMFTLineReaderList
      extends Object

  A line reader based on a list of strings.

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static SMFTLineReaderType` | `create(URI in_uri, javaslang.collection.List<String> in_lines, int in_start)` Construct a new line reader.
    `Optional<javaslang.collection.List<String>>` | `line()` Get the next line.
    `protected String` | `lineNextRaw()`
    `protected org.slf4j.Logger` | `log()`
    `com.io7m.jlexing.core.LexicalPosition<URI>` | `position()`

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

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

- - ### Method Detail

    - #### create

          public static SMFTLineReaderType create(URI in_uri,
                                                  javaslang.collection.List<String> in_lines,
                                                  int in_start)

      Construct a new line reader.
      Parameters:
        `in_uri` - The file path, for diagnostic messages
        `in_lines` - The stream of lines
        `in_start` - The number of the starting line, for diagnostic messages
      Returns:
        A line reader

    - #### log

          protected org.slf4j.Logger log()

    - #### lineNextRaw

          protected String lineNextRaw()
                                throws IOException

      Throws:
        `IOException`

    - #### position

          public final com.io7m.jlexing.core.LexicalPosition<URI> position()

      Specified by:
        `position` in interface `SMFTLineReaderType`
      Returns:
        The current position

    - #### line

          public final Optional<javaslang.collection.List<String>> line()
                                                                 throws IOException

      Description copied from interface: `SMFTLineReaderType`
      Get the next line.
      Specified by:
        `line` in interface `SMFTLineReaderType`
      Returns:
        A lexed line, or nothing on EOF
      Throws:
        `IOException` - On I/O errors

Copyright © 2017 <code@io7m.com> http://io7m.com