accounting-lib/src/main/java/org/gcube/accounting/datamodel/AggregatedUsageRecord.java

31 lines
763 B
Java

/**
*
*/
package org.gcube.accounting.datamodel;
import org.gcube.accounting.exception.InvalidValueException;
import org.gcube.accounting.exception.NotAggregatableRecorsExceptions;
/**
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
*/
public interface AggregatedUsageRecord<T extends B, B extends SingleUsageRecord> extends UsageRecord {
public T getAggregatedUsageRecord(B b) throws InvalidValueException ;
/**
* Aggregate the Record provided as parameter with this record if Aggregatable
* @throws NotAggregatableRecorsExceptions
*/
public void aggregate(T record) throws NotAggregatableRecorsExceptions;
/* *
*
* @param records
* @return
* /
public Collection<T> aggregate(List<? extends B> records);
*/
}