14
14
import java .util .Map ;
15
15
import java .util .Set ;
16
16
import java .util .UUID ;
17
+ import java .util .stream .Collectors ;
17
18
import java .util .stream .Stream ;
18
19
19
20
/**
@@ -124,8 +125,14 @@ public Map<UUID, ThermalBusInput> getThermalBuses(Map<UUID, OperatorInput> opera
124
125
* @return a map of UUID to object- and uuid-unique {@link ThermalStorageInput} entities
125
126
*/
126
127
public Map <UUID , ThermalStorageInput > getThermalStorages () throws SourceException {
127
- return getCylindricalStorages ().stream ().collect (toMap ());
128
- // FIXME
128
+ return Stream .concat (
129
+ getCylindricalStorages ().stream (),
130
+ getDomesticHotWaterStorages ().stream ()
131
+ )
132
+ .collect (Collectors .toMap (
133
+ ThermalStorageInput ::getUuid ,
134
+ storage -> storage
135
+ ));
129
136
}
130
137
131
138
/**
@@ -150,7 +157,14 @@ public Map<UUID, ThermalStorageInput> getThermalStorages() throws SourceExceptio
150
157
public Map <UUID , ThermalStorageInput > getThermalStorages (
151
158
Map <UUID , OperatorInput > operators , Map <UUID , ThermalBusInput > thermalBuses )
152
159
throws SourceException {
153
- return getCylindricalStorages (operators , thermalBuses ).stream ().collect (toMap ());
160
+ return Stream .concat (
161
+ getCylindricalStorages (operators , thermalBuses ).stream (),
162
+ getDomesticHotWaterStorages (operators , thermalBuses ).stream ()
163
+ )
164
+ .collect (Collectors .toMap (
165
+ ThermalStorageInput ::getUuid ,
166
+ storage -> storage
167
+ ));
154
168
}
155
169
156
170
/**
0 commit comments