|
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.Input
This class provides convenient methods for parsing input. TODO offer input stream constructor
Constructor Summary | |
Input(String source)
Constructor using String source. |
|
Input(StringBuffer source)
Constructor using StringBuffer source. |
Method Summary | |
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 |
getLineNumber()
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 |
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. |
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 Input(StringBuffer source)
StringBuffer
source.
source
- data source
IllegalArgumentException
- if argument was
an nullpointerpublic Input(String source)
String
source.
source
- data source
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 int getLineNumber()
public final void skipWhiteSpace()
public final boolean isEmpty()
public final String readLetterDigitString()
IllegalArgumentException
- if no such characters could
be foundpublic 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 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. |