Package com.singularsys.jep.configurableparser

# Class LookaheadNIterator<E>

java.lang.Object
com.singularsys.jep.configurableparser.Lookahead2Iterator<E>
com.singularsys.jep.configurableparser.LookaheadNIterator<E>

public class LookaheadNIterator<E> extends Lookahead2Iterator<E>
A subclass of a Lookahead2Iterator which allows any number of character of lookahead.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `LookaheadNIterator(Iterator<E> input)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `consume()`
  Eat one token.
  `E`
  `lookahead(int n)`
  Look at character n places up the stream
  `E`
  `nextnext()`
  `E`
  `peekNext()`
  `E`
  `prev()`
  Return the token just consumed.
  `void`
  `setInputIterator(Iterator<E> input)`
  Should be called if the default constructor is used.
  `String`
  `toString()`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### LookaheadNIterator

    public LookaheadNIterator(Iterator<E> input)

- ## Method Details

  - ### setInputIterator

    public void setInputIterator(Iterator<E> input)
    Description copied from class: `Lookahead2Iterator`
    Should be called if the default constructor is used.
    Overrides:
      `setInputIterator` in class `Lookahead2Iterator<E>`
    Parameters:
      `input` - the new input iterator

  - ### peekNext

    public E peekNext()
    Overrides:
      `peekNext` in class `Lookahead2Iterator<E>`

  - ### nextnext

    public E nextnext()
    Overrides:
      `nextnext` in class `Lookahead2Iterator<E>`

  - ### lookahead

    public E lookahead(int n)
    Look at character n places up the stream
    Parameters:
      `n` - number of characters to lookahead
    Returns:
      the token n places ahead

  - ### prev

    public E prev()
    Description copied from class: `Lookahead2Iterator`
    Return the token just consumed.
    Overrides:
      `prev` in class `Lookahead2Iterator<E>`
    Returns:
      the token, or null if no token consumed.

  - ### consume

    public void consume()
    Eat one token.
    Overrides:
      `consume` in class `Lookahead2Iterator<E>`

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Lookahead2Iterator<E>`