Skip to content

Commit 651fa76

Browse files
committed
Renaming some methods in PowerValueSource.
1 parent bd4e443 commit 651fa76

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

src/main/java/edu/ie3/datamodel/io/source/PowerValueSource.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public sealed interface PowerValueSource<
2828
* @param data input data that is used to calculate the next power value.
2929
* @return an option for the power value.
3030
*/
31-
Optional<PValue> getPowerValue(ID data);
31+
Optional<PValue> getValue(ID data);
3232

3333
/**
3434
* Method to determine the next timestamp for which data is present.
@@ -58,12 +58,12 @@ non-sealed interface MarkovBased extends PowerValueSource<PowerProfile, InputDat
5858
// input data
5959

6060
/**
61-
* Interface for the input data of {@link #getPowerValue(InputData)}. The data is used to
62-
* determine the next power.
61+
* Interface for the input data of {@link #getValue(InputData)}. The data is used to determine the
62+
* next power.
6363
*/
6464
sealed interface InputData permits PowerValueSource.TimeSeriesInputValue {
6565
/** Returns the timestamp for which a power value is needed. */
66-
ZonedDateTime getTimes();
66+
ZonedDateTime getTime();
6767
}
6868

6969
/**
@@ -73,7 +73,7 @@ sealed interface InputData permits PowerValueSource.TimeSeriesInputValue {
7373
*/
7474
record TimeSeriesInputValue(ZonedDateTime time) implements InputData {
7575
@Override
76-
public ZonedDateTime getTimes() {
76+
public ZonedDateTime getTime() {
7777
return time;
7878
}
7979
}

src/main/java/edu/ie3/datamodel/io/source/csv/CsvLoadProfileSource.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public Set<LoadProfileEntry<V>> getEntries() {
7070
}
7171

7272
@Override
73-
public Optional<PValue> getPowerValue(TimeSeriesInputValue data) {
73+
public Optional<PValue> getValue(TimeSeriesInputValue data) {
7474
return loadProfileTimeSeries.getValue(data.time());
7575
}
7676

src/main/java/edu/ie3/datamodel/io/source/sql/SqlLoadProfileSource.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ public Set<LoadProfileEntry<V>> getEntries() {
9999
}
100100

101101
@Override
102-
public Optional<PValue> getPowerValue(TimeSeriesInputValue data) {
102+
public Optional<PValue> getValue(TimeSeriesInputValue data) {
103103
ZonedDateTime time = data.time();
104104

105105
Set<LoadProfileEntry<V>> entries =

src/test/groovy/edu/ie3/datamodel/io/source/sql/SqlLoadProfileSourceIT.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ class SqlLoadProfileSourceIT extends Specification implements TestContainerHelpe
6363

6464
def "A SqlTimeSeriesSource can read and correctly parse a single value for a specific date"() {
6565
when:
66-
def value = loadSource.getPowerValue(new PowerValueSource.TimeSeriesInputValue(TIME_00MIN))
66+
def value = loadSource.getValue(new PowerValueSource.TimeSeriesInputValue(TIME_00MIN))
6767

6868
then:
6969
value.present

0 commit comments

Comments
 (0)