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:
MarkBryanMilligan
2021-09-07 22:56:22 -05:00
parent d63f6df1fd
commit 0cfdaaa272
12 changed files with 209 additions and 26 deletions

View File

@@ -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);
}

View File

@@ -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);
}