net.sf.jsefa.common.lowlevel.io
Class LineSegment

java.lang.Object
  extended by net.sf.jsefa.common.lowlevel.io.LineSegment

public final class LineSegment
extends Object

A segment of a line of a stream.

A LineSegement consists of a content, a line and column number within the stream (regarding the start of the content) and a terminator.

Note: The line number and the column number starts both with 1.

Author:
Norman Lahme-Huetig

Nested Class Summary
static class LineSegment.Terminator
          Different types of content terminators.
 
Constructor Summary
LineSegment(String content, int lineNumber, int columnNumber, LineSegment.Terminator terminator)
          Constructs a new LineSegment.
 
Method Summary
 int getColumnNumber()
           
 String getContent()
           
 int getLineNumber()
           
 LineSegment.Terminator getTerminator()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LineSegment

public LineSegment(String content,
                   int lineNumber,
                   int columnNumber,
                   LineSegment.Terminator terminator)
Constructs a new LineSegment.

Parameters:
content - the content
lineNumber - the line number
columnNumber - the column number
terminator - the terminator
Method Detail

getContent

public String getContent()
Returns:
the content

getLineNumber

public int getLineNumber()
Returns:
the line number (starting with 1)

getColumnNumber

public int getColumnNumber()
Returns:
the column number (starting with 1)

getTerminator

public LineSegment.Terminator getTerminator()
Returns:
the terminator


Copyright © 2014. All rights reserved.