@Override
    public Token get(int i) {
        if ( i < 0 || i >= tokens.size() ) {
            throw new IndexOutOfBoundsException("token index "+i+" out of range 0.."+(tokens.size()-1));
        }
        return tokens.get(i);
    }
Add {@code n} elements to buffer.

@return The actual number of elements added to the buffer.
runtime/Java/src/org/antlr/v4/runtime/BufferedTokenStream.java