Package org.jreliability.booleanfunction
Class TermUtils.ParseString
- java.lang.Object
-
- org.jreliability.booleanfunction.TermUtils.ParseString
-
- Enclosing class:
- TermUtils
protected static class TermUtils.ParseString extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description ParseString(java.lang.String string)
Constructs aTermUtils.ParseString
with a givenString
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description char
getCurrent()
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
skipSpaces()
Moves the pointer to the next character that is not a blank or newline character.java.lang.String
toString()
-
-
-
Constructor Detail
-
ParseString
public ParseString(java.lang.String string)
Constructs aTermUtils.ParseString
with a givenString
.- Parameters:
string
- the original string
-
-
Method Detail
-
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
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
skipSpaces
public void skipSpaces()
Moves the pointer to the next character that is not a blank or newline character.
-
-