Record Class ThermalGrid
java.lang.Object
java.lang.Record
edu.ie3.datamodel.models.input.container.ThermalGrid
- All Implemented Interfaces:
InputContainer<ThermalInput>
,Serializable
public record ThermalGrid(ThermalBusInput bus, Set<ThermalHouseInput> houses, Set<ThermalStorageInput> storages)
extends Record
implements InputContainer<ThermalInput>
Container object to denote a fully connected thermal "grid". As there are currently no branch
elements, a grid always only consists of one
ThermalBusInput
and all its connected ThermalUnitInput
s- See Also:
-
Constructor Summary
ConstructorDescriptionThermalGrid
(ThermalBusInput bus, Collection<ThermalHouseInput> houses, Collection<ThermalStorageInput> storages) ThermalGrid
(ThermalBusInput bus, Set<ThermalHouseInput> houses, Set<ThermalStorageInput> storages) Creates an instance of aThermalGrid
record class. -
Method Summary
Modifier and TypeMethodDescriptionbus()
Returns the value of thebus
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.houses()
Returns the value of thehouses
record component.storages()
Returns the value of thestorages
record component.toString()
Returns a string representation of this record class.
-
Constructor Details
-
ThermalGrid
public ThermalGrid(ThermalBusInput bus, Collection<ThermalHouseInput> houses, Collection<ThermalStorageInput> storages) -
ThermalGrid
public ThermalGrid(ThermalBusInput bus, Set<ThermalHouseInput> houses, Set<ThermalStorageInput> storages) Creates an instance of aThermalGrid
record class.- Parameters:
bus
- the value for thebus
record componenthouses
- the value for thehouses
record componentstorages
- the value for thestorages
record component
-
-
Method Details
-
allEntitiesAsList
- Specified by:
allEntitiesAsList
in interfaceInputContainer<ThermalInput>
- Returns:
- unmodifiable List of all entities
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object)
. -
bus
Returns the value of thebus
record component.- Returns:
- the value of the
bus
record component
-
houses
Returns the value of thehouses
record component.- Returns:
- the value of the
houses
record component
-
storages
Returns the value of thestorages
record component.- Returns:
- the value of the
storages
record component
-