|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectto.etc.domui.converter.MiniScanner
public class MiniScanner
A helper class which handles string scanning for converters.
Constructor Summary | |
---|---|
MiniScanner()
|
Method Summary | |
---|---|
boolean |
accept()
Move past the "current" character to the next one; return false if eof. |
boolean |
copy()
Accept the current character and copy it to the buffer; return eof if we are at eof after the accept. |
void |
copy(int i)
|
boolean |
eof()
Return T if at eof. |
boolean |
eofSkipWS()
Returns T if all that is left is whitespace before eof. |
static MiniScanner |
getInstance()
Get a miniscanner instance. |
java.lang.String |
getStringResult()
Returns the string built in the buffer and clears the buffer in the process. |
void |
init(java.lang.String in)
Reset the scanner for a next string to scan. |
int |
LA()
Return the character at the current location, or -1 if at end of the string. |
int |
LA(int ix)
Return the nth char after the current location, or -1 if that is past the end of the string. |
boolean |
match(java.lang.String s)
|
long |
scanDuration(java.lang.String in)
|
boolean |
scanLaxNumber(java.lang.String in)
FIXME THIS IS WRONG - for any real type we cannot distinguish between the use of decimal point or comma as either separator or fraction indicator. |
boolean |
scanLaxWithCurrencySign(java.lang.String in)
Scans the input as a lax euro string and leave the buffer to hold a parseable numeric string for one of the to-java-type converters. |
boolean |
skip(char c)
If the current character equals the specified one skip it by accept() and return true, else do nothing and return false. |
void |
skipWs()
Skip till the 1st non-ws character. |
int |
val()
Returns the last integer "value" scanned. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MiniScanner()
Method Detail |
---|
public static MiniScanner getInstance()
public void init(java.lang.String in)
in
- public int LA()
public int LA(int ix)
ix
-
public boolean accept()
public boolean copy()
public void copy(int i)
public boolean skip(char c)
c
-
public boolean eof()
public java.lang.String getStringResult()
public boolean eofSkipWS()
public boolean scanLaxWithCurrencySign(java.lang.String in) throws ValidationException
ValidationException
public boolean scanLaxNumber(java.lang.String in) throws ValidationException
in
-
ValidationException
public int val()
public long scanDuration(java.lang.String in)
public void skipWs()
public boolean match(java.lang.String s)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |