Package org.apache.calcite.util
Interface Puffin.Line<G,F>
- Type Parameters:
G
- Type of state that is created when we start processingF
- 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 TypeMethodDescriptionboolean
contains
(CharSequence seek) Returns whether the current line starts withseek
.boolean
Returns whether the current line ends withsuffix
.filename()
Returns the filename of the current source.int
fnr()
Returns the ordinal of the current line in its source.Returns the global state.boolean
isLast()
Returns whether the current line is the last line in its source.line()
Returns the text of the current line.boolean
Returns whether the current line matchesregex
.source()
Returns the current source.boolean
startsWith
(String prefix) Returns whether the current line starts withprefix
.state()
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
Returns whether the current line starts withprefix
. -
contains
Returns whether the current line starts withseek
. -
endsWith
Returns whether the current line ends withsuffix
. -
matches
Returns whether the current line matchesregex
. -
matcher
-
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.
-