Class EnergyTotal
Object
org.anchoranalysis.mpp.feature.energy.EnergyTotal
- All Implemented Interfaces:
Serializable
public class EnergyTotal extends Object implements Serializable
Represents the total energy of a system, which can be modified and queried.
This class is serializable and provides methods for deep copying, adding energy, and retrieving the total energy.
- See Also:
- Serialized Form
-
Constructor Summary
Constructors Constructor Description EnergyTotal()EnergyTotal(double total) -
Method Summary
Modifier and Type Method Description voidadd(double val)Adds a value to the total energy.EnergyTotaldeepCopy()Creates a deep copy of thisEnergyTotalinstance.doublegetTotal()Gets the current total energy value.StringtoString()
-
Constructor Details
-
EnergyTotal
public EnergyTotal(double total) -
EnergyTotal
public EnergyTotal()
-
-
Method Details
-
deepCopy
Creates a deep copy of thisEnergyTotalinstance.- Returns:
- a new
EnergyTotalinstance with the same total energy value
-
add
public final void add(double val)Adds a value to the total energy.- Parameters:
val- the value to add to the total energy
-
getTotal
public final double getTotal()Gets the current total energy value.- Returns:
- the total energy as a double
-
toString
-