Skip to content

Commit f4a0410

Browse files
committed
feat: introduce MeasureBackedCursor record
1 parent 86855fc commit f4a0410

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package net.laprun.sustainability.power.measure;
2+
3+
import net.laprun.sustainability.power.analysis.Recorder;
4+
5+
public record MeasureBackedCursor(Recorder measure, PartialCursor cursor) {
6+
public double sum() {
7+
return cursor.sum(measure.liveMeasures());
8+
}
9+
10+
public double[] view() {
11+
return cursor.viewOf(measure.liveMeasures());
12+
}
13+
}

0 commit comments

Comments
 (0)