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
-
string
- The target string
-
IndexedString(String)
- Constructs a new indexed string on the given string
-
IndexedString(InputStream)
- Constructs a new indexed string on the given stream
-
endOfLine(int)
- Returns the index of the end of the indicated line
-
getIndicies()
- Returns an array of the starts of each line in the String
-
getLine(int)
- Returns a string containing the indicated line
-
numberOfLines()
- Returns the number of lines of text in the String
-
startOfLine(int)
- Returns the index of the start of the indicated line
-
toString()
- Returns the target string
string
public String string
- The target string
IndexedString
public IndexedString(String s)
- Constructs a new indexed string on the given string
IndexedString
public IndexedString(InputStream stream) throws IOException
- Constructs a new indexed string on the given stream
getIndicies
public int[] getIndicies()
- Returns an array of the starts of each line in the String
numberOfLines
public int numberOfLines()
- Returns the number of lines of text in the String
startOfLine
public int startOfLine(int lineNumber)
- Returns the index of the start of the indicated line
endOfLine
public int endOfLine(int lineNumber)
- Returns the index of the end of the indicated line
getLine
public String getLine(int lineNumber)
- Returns a string containing the indicated line
toString
public String toString()
- Returns the target string
- Overrides:
- toString in class Object
All Packages Class Hierarchy This Package Previous Next Index