package com.atlassian.bitbucket.mesh.util;

/**
 * A consumer that accepts a single input argument and returns a boolean indicating if further
 * inputs are wanted.
 *
 * @param <T> the type of the input to the operation
 */
@FunctionalInterface
public interface SatiableConsumer<T> {

    /**
     * Performs this operation on the given argument.
     *
     * @param value the input argument
     * @return {@code true} to signal to the producer that no more elements should be produced; otherwise
     *         {@code false} to indicate if the producer has more elements to continue calling {@code accept}
     */
    boolean accept(T value);
}