package org.gcube.data.streams.generators; import org.gcube.data.streams.exceptions.StreamSkipSignal; /** * A partial implementation of {@link Filter} that provides support for skipping elements * @author Fabio Simeoni * * @param the type of input elements * @param the type of yielded elements */ public abstract class Filter implements Generator { private final StreamSkipSignal skip = new StreamSkipSignal(); /** * Invoked to skip the current element. */ protected void skip() { throw skip; } }