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.ParseStringwith a givenString. -
Method Summary
Modifier and TypeMethodDescriptioncharReturns the current character.booleanisEnd()Returnstrueif the end of theStringis reached.voidnext()Moves the pointer to the next character.voidnext(int n) Moves the pointer to the n-th next character.voidMoves 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.ParseStringwith 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()Returnstrueif the end of theStringis 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.
-