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

org.daisy.dotify.common.splitter.StepForward Maven / Gradle / Ivy

There is a newer version: 1.0.7
Show newest version
package org.daisy.dotify.common.splitter;

/**
 * Provides a package interface for iterating over a list of units.
 *
 * @param 
 * @author Joel Håkansson
 */
interface StepForward {
    /**
     * Performed when a unit should be included.
     *
     * @param unit the unit to include
     */
    void addUnit(T unit);

    /**
     * Checks whether the inclusion of the unit would overflow.
     *
     * @param buffer the unit to test
     * @return returns true, if inclusion overflows, false otherwise
     */
    boolean overflows(T buffer);

    /**
     * Performed when a unit is discarded.
     *
     * @param unit the unit that is discarded
     */
    void addDiscarded(T unit);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy