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

tech.tablesaw.aggregate.DateTimeAggregateFunction 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.DateTimeColumn;

import java.time.LocalDateTime;

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

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

    abstract public LocalDateTime summarize(DateTimeColumn column);

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy