Top Fields Constructors Methods
org.glassfish.pfl.basic.tools.file

public Class StringParser

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
private char
private String
private int

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private boolean
next()

public String
parseInt()

Return int matched at current position as a string.

private void
setPos(int newPos)

public boolean

Returns:

whether or not str was at current position
skipString
(String
to skip (must be at current position)
str
)

skip over str, if str is at the current position.

public boolean

Returns:

whether or not str was found
skipToString
(String
String for which we are looking
str
)

skip everything until str is found.

public boolean

Returns:

whether some whitespace was skipped.
skipWhitespace
()

Skip over whitespace.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

currentback to summary
private char current
databack to summary
private String data
posback to summary
private int pos

Constructor Detail

StringParserback to summary
public StringParser(String str)

Method Detail

nextback to summary
private boolean next()
parseIntback to summary
public String parseInt()

Return int matched at current position as a string.

setPosback to summary
private void setPos(int newPos)
skipStringback to summary
public boolean skipString(String str)

skip over str, if str is at the current position.

Parameters
str:String

to skip (must be at current position)

Returns:boolean

whether or not str was at current position

skipToStringback to summary
public boolean skipToString(String str)

skip everything until str is found. Returns true if found, otherwise false.

Parameters
str:String

String for which we are looking

Returns:boolean

whether or not str was found

skipWhitespaceback to summary
public boolean skipWhitespace()

Skip over whitespace. Returns true if some whitespace skipped.

Returns:boolean

whether some whitespace was skipped.