
net.sf.jagg.DependentAnalyticFunction Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jagg-core Show documentation
Show all versions of jagg-core Show documentation
jAgg is a Java 5.0 API that supports “group by” operations on Lists of Java objects: aggregate operations such as count, sum, max, min, avg, and many more. It also allows custom aggregate operations.
The newest version!
package net.sf.jagg;
import net.sf.jagg.model.WindowClause;
/**
* A DependentAnalyticFunction
is an AnalyticFunction
* that depends on the results of multiple other AnalyticFunctions
* that have different WindowClauses
. The Analytic
* class detects DependentAnalyticFunctions
, loads the functions
* they're dependent on, processes them normally, and feeds the values back to
* this function to calculate the value depending on the these values.
*
* @author Randy Gettman
* @since 0.9.0
*/
public interface DependentAnalyticFunction extends AnalyticFunction
{
/**
* Returns the number of AnalyticFunctions
on which this
* DependentAnalyticFunction
depends. This controls the domain
* of index values that getAnalyticFunction
and
* getWindowClause
can take.
*
* @return The number of AnalyticFunctions
on which this
* DependentAnalyticFunction
depends.
*/
public int getNumDependentFunctions();
/**
* Returns an AnalyticFunction
on which this
* DependentAnalyticFunction
depends.
* @param index A 0-based index, ranging from 0
through
* getNumDependentFunctions() - 1
.
* @return An AnalyticFunction
.
* @see #getNumDependentFunctions
*/
public AnalyticFunction getAnalyticFunction(int index);
/**
* Returns a WindowClause
that is associated with the
* AnalyticFunction
at the same index.
* @param index A 0-based index, ranging from 0
through
* getNumDependentFunctions() - 1
.
* @return A WindowClause
that is associated with the
* AnalyticFunction
at the same index.
* @see #getAnalyticFunction
* @see #getNumDependentFunctions
*/
public WindowClause getWindowClause(int index);
/**
* Sets the current value of the AnalyticFunction
at the given
* index. Analytic
calls this getNumDependentFunctions()
* times prior to calling terminate()
, so that terminate
* can make a calculation based on these values.
* @param index A 0-based index, ranging from 0
through
* getNumDependentFunctions() - 1
.
* @param value The current value of the AnalyticFunction
.
* @see #terminate
*/
public void setValue(int index, Object value);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy