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

net.customware.confluence.reporting.query.Results Maven / Gradle / Ivy

The newest version!
package net.customware.confluence.reporting.query;

import java.util.Iterator;

import org.randombits.facade.Facadable;

/**
 * Provides access to the result set, as well as the number of items. Instances
 * of this type are {@link Iterable}, so they can be used with the
 * for ( V x : y ) syntax.
 * 
 * @param 
 *            The value type.
 */
@Facadable
public interface Results extends Iterator {
    /**
     * The size for result sets whose size is unknown (-1).
     */
    static int UNKNOWN = -1;

    /**
     * Returns the number of items in the result set, or {@link #UNKNOWN}.
     * 
     * @return The result set size or {@link #UNKNOWN}.
     */
    int size();

    /**
     * This should be called after the results have been processed, so that any
     * cleanup code can be run.
     */
    void close() throws QueryException;
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy