Package org.jreliability.booleanfunction
Class TermUtils.ParseString
java.lang.Object
org.jreliability.booleanfunction.TermUtils.ParseString
- Enclosing class:
TermUtils
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionParseString
(String string) Constructs aTermUtils.ParseString
with a givenString
. -
Method Summary
Modifier and TypeMethodDescriptionchar
Returns the current character.boolean
isEnd()
Returnstrue
if the end of theString
is reached.void
next()
Moves the pointer to the next character.void
next
(int n) Moves the pointer to the n-th next character.void
Moves the pointer to the next character that is not a blank or newline character.toString()
-
Field Details
-
string
The originalString
. -
current
protected int currentThe pointer for the current position.
-
-
Constructor Details
-
ParseString
Constructs aTermUtils.ParseString
with a givenString
.- Parameters:
string
- the original string
-
-
Method Details
-
getCurrent
public char getCurrent()Returns the current character.- Returns:
- the current character
-
next
public void next()Moves the pointer to the next character. -
next
public void next(int n) Moves the pointer to the n-th next character.- Parameters:
n
- the n-th next
-
isEnd
public boolean isEnd()Returnstrue
if the end of theString
is reached.- Returns:
- true if the end of the string is reached
-
toString
-
skipSpaces
public void skipSpaces()Moves the pointer to the next character that is not a blank or newline character.
-