bpiwowar.argparser
Class StringScanner

java.lang.Object
  extended by bpiwowar.argparser.StringScanner

public class StringScanner
extends Object

This class is passed as an argument to parse argument strings

Author:
Benjamin Piwowarski

Constructor Summary
StringScanner(String s)
          Construct our scanner based on a string
 
Method Summary
 boolean atBeginning()
           
 boolean atEnd()
           
 char getc()
           
 int getIndex()
           
 String getString()
           
 String getStringDelimiters()
           
 boolean matchDigits()
           
 boolean matchString(String s)
           
 char peekc()
           
 boolean scanBoolean()
           
 char scanChar()
           
 double scanDouble()
           
 long scanInt()
           
 long scanInt(int radix)
           
 long scanInt(int radix, boolean skipWhite)
           
 String scanNonWhiteSpaceString()
           
 char scanQuotedChar()
           
 String scanQuotedString()
           
 String scanString()
           
 char scanUnquotedChar()
           
 void setIndex(int i)
           
 void setStringDelimiters(String s)
           
 void skipWhiteSpace()
           
 String substring(int i0)
           
 String substring(int i0, int i1)
           
 void ungetc()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringScanner

public StringScanner(String s)
Construct our scanner based on a string

Parameters:
s -
Method Detail

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.