bpiwowar.argparser
Class StringScanner
java.lang.Object
bpiwowar.argparser.StringScanner
public class StringScanner
- extends Object
This class is passed as an argument to parse argument strings
- Author:
- Benjamin Piwowarski
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StringScanner
public StringScanner(String s)
- Construct our scanner based on a string
- Parameters:
s
-
getIndex
public int getIndex()
setIndex
public void setIndex(int i)
setStringDelimiters
public void setStringDelimiters(String s)
getStringDelimiters
public String getStringDelimiters()
scanChar
public char scanChar()
throws StringScanException
- Throws:
StringScanException
scanQuotedChar
public char scanQuotedChar()
throws StringScanException
- Throws:
StringScanException
scanUnquotedChar
public char scanUnquotedChar()
throws StringScanException
- Throws:
StringScanException
scanQuotedString
public String scanQuotedString()
throws StringScanException
- Throws:
StringScanException
scanNonWhiteSpaceString
public String scanNonWhiteSpaceString()
throws StringScanException
- Throws:
StringScanException
scanString
public String scanString()
throws StringScanException
- Throws:
StringScanException
getString
public String getString()
throws StringScanException
- Throws:
StringScanException
scanInt
public long scanInt()
throws StringScanException
- Throws:
StringScanException
scanInt
public long scanInt(int radix)
throws StringScanException
- Throws:
StringScanException
scanInt
public long scanInt(int radix,
boolean skipWhite)
throws StringScanException
- Throws:
StringScanException
scanDouble
public double scanDouble()
throws StringScanException
- Throws:
StringScanException
scanBoolean
public boolean scanBoolean()
throws StringScanException
- Throws:
StringScanException
matchString
public boolean matchString(String s)
matchDigits
public boolean matchDigits()
skipWhiteSpace
public void skipWhiteSpace()
atEnd
public boolean atEnd()
atBeginning
public boolean atBeginning()
ungetc
public void ungetc()
getc
public char getc()
peekc
public char peekc()
substring
public String substring(int i0,
int i1)
substring
public String substring(int i0)
Copyright © 2013. All Rights Reserved.