![JAR search and dependency download from the Maven repository](/logo.png)
tech.tablesaw.aggregate.BooleanNumericFunction Maven / Gradle / Ivy
The newest version!
package tech.tablesaw.aggregate;
import tech.tablesaw.api.BooleanColumn;
import tech.tablesaw.api.ColumnType;
/**
* Partial implementation of Aggregate function that returns a Double value when applied to a
* BooleanColumn
*
* @deprecated Use {@link BooleanDoubleAggregateFunction} instead
*/
abstract class BooleanNumericFunction extends AggregateFunction {
/**
* Constructs a BooleanNumericFunction with the given name. The name may be used to name a column
* in the output when this function is used by {@link Summarizer}
*/
public BooleanNumericFunction(String functionName) {
super(functionName);
}
/** Returns a double that is the result of applying this function to the given column */
@Override
public abstract Double summarize(BooleanColumn column);
/** {@inheritDoc} */
@Override
public boolean isCompatibleColumn(ColumnType type) {
return type.equals(ColumnType.BOOLEAN);
}
/** {@inheritDoc} */
@Override
public ColumnType returnType() {
return ColumnType.DOUBLE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy