|
Hilbert II - JAVA-Packages - Principia Mathematica II | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.meyling.principia.io.TextInput
This class provides convenient methods for parsing input. TODO offer input stream constructor
Constructor Summary | |
TextInput(StringBuffer source,
String address,
String localAddress)
Constructor using StringBuffer source. |
|
TextInput(String source,
String address,
String localAddress)
Constructor using String source. |
Method Summary | |
String |
getAddress()
Get address (or something to identify it) of input source. |
char |
getChar()
Reads a single character and does not change the reading position. |
char |
getChar(int i)
Reads a single character and does not change the reading position. |
int |
getColumn()
Returns the current column number. |
String |
getLine()
Returns the current line. |
String |
getLocalAddress()
Get local address (or something to identify it) of input source. |
int |
getMaximumPosition()
Returns the highest position number possible. |
int |
getPosition()
Returns the current position. |
int |
getRow()
Returns the current line number. |
boolean |
isEmpty()
Is there no data left for reading? |
char |
readChar()
Reads a single character and increments the reading position by one. |
int |
readCounter()
Reads the next positive integer made completly out of digits, leading whitespace is skipped. |
String |
readLatexEnvironment()
Reads the next latex string containing Changes reading position. |
String |
readLatexWord()
Reads the next word string containing Changes reading position. |
String |
readLetterDigitString()
Reads the next string containing only letters or digits, leading whitespace is skipped. |
String |
readQuoted()
Reads the next quoted string, leading whitespace is skipped. |
void |
setPosition(int position)
Sets the current position (and indirectly the line number). |
String |
showLinePosition()
Show reading position. |
void |
skipWhiteSpace()
Skips white space, beginning from reading position. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public TextInput(StringBuffer source, String address, String localAddress)
StringBuffer
source.
source
- data sourceaddress
- for identifing sourcelocalAddress
- source address
IllegalArgumentException
- if argument was
an nullpointerpublic TextInput(String source, String address, String localAddress)
String
source.
source
- data sourceaddress
- for identifing sourcelocalAddress
- source address
IllegalArgumentException
- if argument was
an nullpointerMethod Detail |
public final char readChar()
Character.MAX_VALUE
is returnedpublic final char getChar()
Character.MAX_VALUE
is returnedpublic final char getChar(int i)
i
- offset from current reading position.
Character.MAX_VALUE
is returnedpublic final void skipWhiteSpace()
public final boolean isEmpty()
public final String readLetterDigitString()
IllegalArgumentException
- if no such characters could
be foundpublic final String readLatexEnvironment()
public final String readLatexWord()
public final int readCounter()
IllegalArgumentException
- if no digits where found or
the number was to big for an int
public final String readQuoted() throws IllegalArgumentException
IllegalArgumentException
- if no correctly quoted
string was foundpublic final int getRow()
public final int getColumn()
public final String getLine()
public final int getPosition()
public final int getMaximumPosition()
public final void setPosition(int position)
position
- set current positionpublic final String getAddress()
public final String getLocalAddress()
public final String showLinePosition()
|
Hilbert II - JAVA-Packages - Principia Mathematica II | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
©left GNU General Public Licence All Rights Reserved. |