Class TermUtils.ParseString

  • Enclosing class:
    TermUtils

    protected static class TermUtils.ParseString
    extends java.lang.Object
    The TermUtils.ParseString is a helper class to parse a helper Object from a given String.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected int current
      The pointer for the current position.
      protected java.lang.String string
      The original String.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      char getCurrent()
      Returns the current character.
      boolean isEnd()
      Returns true if the end of the String 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()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • string

        protected java.lang.String string
        The original String.
      • current

        protected int current
        The pointer for the current position.
    • Constructor Detail

      • ParseString

        public ParseString​(java.lang.String string)
        Constructs a TermUtils.ParseString with a given String.
        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()
        Returns true if the end of the String is reached.
        Returns:
        true if the end of the string is reached
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • skipSpaces

        public void skipSpaces()
        Moves the pointer to the next character that is not a blank or newline character.