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

tech.tablesaw.aggregate.DateAggregateFunction 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.DateColumn;

import java.time.LocalDate;

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

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

    abstract public LocalDate summarize(DateColumn column);

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy