Interface Puffin.Line<G,F>

Type Parameters:
G - Type of state that is created when we start processing
F - Type of state that is created when we start processing a file
Enclosing class:
Puffin

public static interface Puffin.Line<G,F>
A line in a file.

Created by an executing program and passed to the predicate and action that you registered in Puffin.Builder.add(Predicate, Consumer).

  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Returns whether the current line starts with seek.
    boolean
    endsWith(String suffix)
    Returns whether the current line ends with suffix.
    Returns the filename of the current source.
    int
    fnr()
    Returns the ordinal of the current line in its source.
    Returns the global state.
    boolean
    Returns whether the current line is the last line in its source.
    Returns the text of the current line.
    matcher(String regex)
     
    boolean
    matches(String regex)
    Returns whether the current line matches regex.
    Returns the current source.
    boolean
    Returns whether the current line starts with prefix.
    Returns the state of the current file.
  • Method Details

    • globalState

      G globalState()
      Returns the global state.
    • state

      F state()
      Returns the state of the current file.
    • fnr

      int fnr()
      Returns the ordinal of the current line in its source.
    • filename

      String filename()
      Returns the filename of the current source.
    • source

      Source source()
      Returns the current source.
    • startsWith

      boolean startsWith(String prefix)
      Returns whether the current line starts with prefix.
    • contains

      boolean contains(CharSequence seek)
      Returns whether the current line starts with seek.
    • endsWith

      boolean endsWith(String suffix)
      Returns whether the current line ends with suffix.
    • matches

      boolean matches(String regex)
      Returns whether the current line matches regex.
    • matcher

      Matcher matcher(String regex)
    • line

      String line()
      Returns the text of the current line.
    • isLast

      boolean isLast()
      Returns whether the current line is the last line in its source.