Interface PushbackSequence<T>

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean hasNext()
      Determine if this sequence has another element.
      int index()
      Get the current index of the PushbackString.
      void mark()
      Mark the location of the current index.
      T next()
      Return the next element in the Sequence and increment the current index.
      T nextHex()
      Return the next element in the Sequence in Hex format and increment the current index.
      T nextOctal()
      Return the next element in the Sequence in Octal format and increment the current index.
      T peek()
      Return the next element in the Sequence without affecting the current index.
      boolean peek​(T c)
      Test to see if the next element in the Sequence matches the supplied value without affecting the current index.
      void pushback​(T c)  
      java.lang.String remainder()
      Not at all sure what this method is intended to do.
      void reset()
      Set the index back to the last marked location.
    • Method Detail

      • pushback

        void pushback​(T c)
        Parameters:
        c -
      • index

        int index()
        Get the current index of the PushbackString. Typically used in error messages.
        Returns:
        The current index of the PushbackSequence.
      • hasNext

        boolean hasNext()
        Determine if this sequence has another element.
        Returns:
        True if there is another element in this sequence. False otherwise.
      • next

        T next()
        Return the next element in the Sequence and increment the current index.
        Returns:
        The next element in the Sequence.
      • nextHex

        T nextHex()
        Return the next element in the Sequence in Hex format and increment the current index.
        Returns:
        The next element in the Sequence in Hex format (if that makes sense for this Sequence's type).
      • nextOctal

        T nextOctal()
        Return the next element in the Sequence in Octal format and increment the current index.
        Returns:
        The next element in the Sequence in Octal format (if that makes sense for this Sequence's type).
      • peek

        T peek()
        Return the next element in the Sequence without affecting the current index.
        Returns:
        the next element in the Sequence.
      • peek

        boolean peek​(T c)
        Test to see if the next element in the Sequence matches the supplied value without affecting the current index.
        Parameters:
        c - The value to match against.
        Returns:
        True if the next element matches the supplied value. False otherwise.
      • mark

        void mark()
        Mark the location of the current index.
      • reset

        void reset()
        Set the index back to the last marked location.
      • remainder

        java.lang.String remainder()
        Not at all sure what this method is intended to do. There is a line in HTMLEntityCodec that said calling this method is a "kludge around PushbackString..."
        Returns:
        Return the remaining portion of the sequence, with any pushback appended to the front (if any).