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

tech.tablesaw.aggregate.TimeAggregateFunction Maven / Gradle / Ivy

There is a newer version: 0.43.1
Show newest version
package tech.tablesaw.aggregate;

import tech.tablesaw.api.ColumnType;
import tech.tablesaw.api.TimeColumn;

import java.time.LocalTime;

/**
 * A partial implementation of aggregate functions to summarize over a time column
 */
public abstract class TimeAggregateFunction extends AggregateFunction {

    public TimeAggregateFunction(String name) {
        super(name);
    }

    abstract public LocalTime summarize(TimeColumn column);

    @Override
    public boolean isCompatibleColumn(ColumnType type) {
        return type.equals(ColumnType.LOCAL_TIME);
    }

    @Override
    public ColumnType returnType() {
        return ColumnType.LOCAL_TIME;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy