Class dstc.kalimantan.util.IndexedString
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class dstc.kalimantan.util.IndexedString

java.lang.Object
   |
   +----dstc.kalimantan.util.IndexedString

public class IndexedString
extends Object
A string which retains line number information

Variable Index

 o string
The target string

Constructor Index

 o IndexedString(String)
Constructs a new indexed string on the given string
 o IndexedString(InputStream)
Constructs a new indexed string on the given stream

Method Index

 o endOfLine(int)
Returns the index of the end of the indicated line
 o getIndicies()
Returns an array of the starts of each line in the String
 o getLine(int)
Returns a string containing the indicated line
 o numberOfLines()
Returns the number of lines of text in the String
 o startOfLine(int)
Returns the index of the start of the indicated line
 o toString()
Returns the target string

Variables

 o string
  public String string
The target string

Constructors

 o IndexedString
  public IndexedString(String s)
Constructs a new indexed string on the given string
 o IndexedString
  public IndexedString(InputStream stream) throws IOException
Constructs a new indexed string on the given stream

Methods

 o getIndicies
  public int[] getIndicies()
Returns an array of the starts of each line in the String
 o numberOfLines
  public int numberOfLines()
Returns the number of lines of text in the String
 o startOfLine
  public int startOfLine(int lineNumber)
Returns the index of the start of the indicated line
 o endOfLine
  public int endOfLine(int lineNumber)
Returns the index of the end of the indicated line
 o getLine
  public String getLine(int lineNumber)
Returns a string containing the indicated line
 o toString
  public String toString()
Returns the target string
Overrides:
toString in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index