Class EnergySavedAll
Object
org.anchoranalysis.mpp.feature.energy.saved.EnergySavedAll
- All Implemented Interfaces:
Serializable
public class EnergySavedAll extends Object implements Serializable
Saves and manages the total energy for all items in a collection.
This class implements Serializable for persistence of energy calculations.
- See Also:
- Serialized Form
-
Constructor Summary
Constructors Constructor Description EnergySavedAll() -
Method Summary
Modifier and Type Method Description voidcalc(EnergyMemoList memoList, EnergySchemeWithSharedFeatures energyScheme, EnergyStackWithoutParameters energyStack)Calculates the total energy for all items using the provided energy scheme and stack.EnergySavedAlldeepCopy()Creates a deep copy of this instance.doublegetEnergyTotal()Gets the total energy for all items.EnergySavedAllshallowCopy()Creates a shallow copy of this instance.
-
Constructor Details
-
EnergySavedAll
public EnergySavedAll()
-
-
Method Details
-
calc
public void calc(EnergyMemoList memoList, EnergySchemeWithSharedFeatures energyScheme, EnergyStackWithoutParameters energyStack) throws NamedFeatureCalculateExceptionCalculates the total energy for all items using the provided energy scheme and stack.- Parameters:
memoList- theEnergyMemoListcontaining energy memos for marksenergyScheme- theEnergySchemeWithSharedFeaturesused for energy calculationsenergyStack- theEnergyStackWithoutParametersproviding context for energy calculations- Throws:
NamedFeatureCalculateException- if there's an error during energy calculation
-
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
EnergySavedAllwith the same total energy
-
deepCopy
Creates a deep copy of this instance.- Returns:
- a new
EnergySavedAllwith the same total energy
-