org.glassfish.pfl.basic.tools.file
Class StringParser

java.lang.Object
  extended by org.glassfish.pfl.basic.tools.file.StringParser

public class StringParser
extends Object


Constructor Summary
StringParser(String str)
           
 
Method Summary
 String parseInt()
          Return int matched at current position as a string.
 boolean skipString(String str)
          skip over str, if str is at the current position.
 boolean skipToString(String str)
          skip everything until str is found.
 boolean skipWhitespace()
          Skip over whitespace.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringParser

public StringParser(String str)
Method Detail

skipToString

public boolean skipToString(String str)
skip everything until str is found. Returns true if found, otherwise false.

Parameters:
str - String for which we are looking
Returns:
whether or not str was found

skipString

public boolean skipString(String str)
skip over str, if str is at the current position.

Parameters:
string - to skip (must be at current position)
Returns:
whether or not str was at current position

skipWhitespace

public boolean skipWhitespace()
Skip over whitespace. Returns true if some whitespace skipped.

Returns:
whether some whitespace was skipped.

parseInt

public String parseInt()
Return int matched at current position as a string.



Copyright © 2013 Oracle. All Rights Reserved.