mirror of
https://github.com/zyphlar/LanternPowerMonitor.git
synced 2024-03-08 14:07:47 +00:00
Keep track of peak production, peak consumption, peak from grid, and peak to grid values to aid in solar panel and storage sizing.
This commit is contained in:
@@ -266,7 +266,7 @@ public class CollectionUtils {
|
||||
public static <T, V> List<V> aggregate(Collection<T> _coll, IAggregator<T, V> _aggregator) {
|
||||
List<V> list = new ArrayList<>();
|
||||
for (T t : makeNotNull(_coll)) {
|
||||
List<V> vs = _aggregator.aggregate(t);
|
||||
Collection<V> vs = _aggregator.aggregate(t);
|
||||
if (vs != null)
|
||||
list.addAll(vs);
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.lanternsoftware.util;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Collection;
|
||||
|
||||
public interface IAggregator<T, V> {
|
||||
List<V> aggregate(T _t);
|
||||
Collection<V> aggregate(T _t);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user