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 ThermalUnitInputs- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionThermalGrid(ThermalBusInput bus, Collection<ThermalHouseInput> houses, Collection<ThermalStorageInput> storages) ThermalGrid(ThermalBusInput bus, Set<ThermalHouseInput> houses, Set<ThermalStorageInput> storages) Creates an instance of aThermalGridrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbus()Returns the value of thebusrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.houses()Returns the value of thehousesrecord component.storages()Returns the value of thestoragesrecord 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 aThermalGridrecord class.- Parameters:
bus- the value for thebusrecord componenthouses- the value for thehousesrecord componentstorages- the value for thestoragesrecord component
-
-
Method Details
-
allEntitiesAsList
- Specified by:
allEntitiesAsListin 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 thebusrecord component.- Returns:
- the value of the
busrecord component
-
houses
Returns the value of thehousesrecord component.- Returns:
- the value of the
housesrecord component
-
storages
Returns the value of thestoragesrecord component.- Returns:
- the value of the
storagesrecord component
-