All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.annimon.stream.LsaIterator Maven / Gradle / Ivy

There is a newer version: 1.2.2
Show newest version
package com.annimon.stream;

import java.util.Iterator;
import java.util.NoSuchElementException;

/**
 * Abstract iterator with implemented {@code remove} method.
 */
abstract class LsaIterator implements Iterator {
 
    @Override
    public void remove() {
        throw new UnsupportedOperationException("remove not supported");
    }

    @Override
    public final T next() {
        if (!hasNext()) {
            throw new NoSuchElementException();
        }
        return nextIteration();
    }

    public abstract T nextIteration();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy