IntStream.consume

Consumes the current symbol in the stream. This method has the following effects:

<ul> <li><strong>Forward movement:</strong> The value of {@link #index index()} before calling this method is less than the value of {@code index()} after calling this method.</li> <li><strong>Ordered lookahead:</strong> The value of {@code LA(1)} before calling this method becomes the value of {@code LA(-1)} after calling this method.</li> </ul>

Note that calling this method does not guarantee that {@code index()} is incremented by exactly 1, as that would preclude the ability to implement filtering streams (e.g. {@link CommonTokenStream} which distinguishes between "on-channel" and "off-channel" tokens).

@throws IllegalStateException if an attempt is made to consume the the end of the stream (i.e. if {@code LA(1)==}{@link #EOF EOF} before calling {@code consume}).

interface IntStream
void
consume
()

Meta