Class EnergySavedAll
Object
EnergySavedAll
- All Implemented Interfaces:
Serializable
Saves and manages the total energy for all items in a collection.
This class implements Serializable
for persistence of energy calculations.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
calc
(EnergyMemoList memoList, EnergySchemeWithSharedFeatures energyScheme, EnergyStackWithoutParameters energyStack) Calculates the total energy for all items using the provided energy scheme and stack.deepCopy()
Creates a deep copy of this instance.double
Gets the total energy for all items.Creates a shallow copy of this instance.
-
Constructor Details
-
EnergySavedAll
public EnergySavedAll()
-
-
Method Details
-
getEnergyTotal
public double getEnergyTotal()Gets the total energy for all items.- Returns:
- the total energy as a double
-
shallowCopy
Creates a shallow copy of this instance.- Returns:
- a new
EnergySavedAll
with the same total energy
-
deepCopy
Creates a deep copy of this instance.- Returns:
- a new
EnergySavedAll
with the same total energy