de.unkrig.commons.text.scanner
Interface DocumentScanner<TT extends java.lang.Enum<TT>>

Type Parameters:
TT -
All Superinterfaces:
ProducerWhichThrows<AbstractScanner.Token<TT>,ScanException>

public interface DocumentScanner<TT extends java.lang.Enum<TT>>
extends ProducerWhichThrows<AbstractScanner.Token<TT>,ScanException>

A scanner which has a notion of a 'line number' and a 'column number' where the previously scanned token starts.


Method Summary
 int getPreviousTokenColumnNumber()
           
 int getPreviousTokenLineNumber()
           
 java.lang.String toString()
          Returns a human-readable text which describes the origin of the previously produced element, e.g. file name, line number and column number
 
Methods inherited from interface de.unkrig.commons.lang.protocol.ProducerWhichThrows
produce
 

Method Detail

getPreviousTokenLineNumber

int getPreviousTokenLineNumber()
Returns:
The line number (counting from one) of the previously produced token

getPreviousTokenColumnNumber

int getPreviousTokenColumnNumber()
Returns:
The column number (counting from one) of the previously produced token

toString

java.lang.String toString()
Description copied from interface: ProducerWhichThrows
Returns a human-readable text which describes the origin of the previously produced element, e.g. file name, line number and column number

Specified by:
toString in interface ProducerWhichThrows<AbstractScanner.Token<TT extends java.lang.Enum<TT>>,ScanException>
Overrides:
toString in class java.lang.Object
Returns:
A human-readable string that indicates the current scanning position, i.e. line number, column number, and possibly more information describing the source from where the document originates.