Package org.opentcs.data.model
Class Vehicle.EnergyLevelThresholdSet
java.lang.Object
org.opentcs.data.model.Vehicle.EnergyLevelThresholdSet
- All Implemented Interfaces:
Serializable
- Enclosing class:
Vehicle
Contains information regarding the energy level threshold values of a vehicle.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionEnergyLevelThresholdSet
(int energyLevelCritical, int energyLevelGood, int energyLevelSufficientlyRecharged, int energyLevelFullyRecharged) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionboolean
int
Returns the vehicle's critical energy level (in percent of the maximum).int
Returns the vehicle's energy level for being fully recharged (in percent of the maximum).int
Returns the vehicle's good energy level (in percent of the maximum).int
Returns the vehicle's energy level for being sufficiently recharged (in percent of the maximum).int
hashCode()
toString()
withEnergyLevelCritical
(int energyLevelCritical) Creates a copy of this object, with the given critical energy level.withEnergyLevelFullyRecharged
(int energyLevelFullyRecharged) Creates a copy of this object, with the given fully recharged energy level.withEnergyLevelGood
(int energyLevelGood) Creates a copy of this object, with the given good energy level.withEnergyLevelSufficientlyRecharged
(int energyLevelSufficientlyRecharged) Creates a copy of this object, with the given sufficiently recharged energy level.
-
Constructor Details
-
EnergyLevelThresholdSet
public EnergyLevelThresholdSet(int energyLevelCritical, int energyLevelGood, int energyLevelSufficientlyRecharged, int energyLevelFullyRecharged) Creates a new instance.- Parameters:
energyLevelCritical
- The value at/below which the vehicle's energy level is considered "critical".energyLevelGood
- The value at/above which the vehicle's energy level is considered "good".energyLevelSufficientlyRecharged
- The value at/above which the vehicle's energy level is considered fully recharged.energyLevelFullyRecharged
- The value at/above which the vehicle's energy level is considered sufficiently recharged.
-
-
Method Details
-
getEnergyLevelCritical
public int getEnergyLevelCritical()Returns the vehicle's critical energy level (in percent of the maximum).The critical energy level is the one at/below which the vehicle should be recharged.
- Returns:
- The vehicle's critical energy level.
-
withEnergyLevelCritical
Creates a copy of this object, with the given critical energy level.- Parameters:
energyLevelCritical
- The value to be set in the copy.- Returns:
- A copy of this object, differing in the given value.
-
getEnergyLevelGood
public int getEnergyLevelGood()Returns the vehicle's good energy level (in percent of the maximum).The good energy level is the one at/above which the vehicle can be dispatched again when charging.
- Returns:
- The vehicle's good energy level.
-
withEnergyLevelGood
Creates a copy of this object, with the given good energy level.- Parameters:
energyLevelGood
- The value to be set in the copy.- Returns:
- A copy of this object, differing in the given value.
-
getEnergyLevelSufficientlyRecharged
public int getEnergyLevelSufficientlyRecharged()Returns the vehicle's energy level for being sufficiently recharged (in percent of the maximum).- Returns:
- This vehicle's sufficiently recharged energy level.
-
withEnergyLevelSufficientlyRecharged
public Vehicle.EnergyLevelThresholdSet withEnergyLevelSufficientlyRecharged(int energyLevelSufficientlyRecharged) Creates a copy of this object, with the given sufficiently recharged energy level.- Parameters:
energyLevelSufficientlyRecharged
- The value to be set in the copy.- Returns:
- A copy of this object, differing in the given value.
-
getEnergyLevelFullyRecharged
public int getEnergyLevelFullyRecharged()Returns the vehicle's energy level for being fully recharged (in percent of the maximum).- Returns:
- The vehicle's fully recharged threshold.
-
withEnergyLevelFullyRecharged
Creates a copy of this object, with the given fully recharged energy level.- Parameters:
energyLevelFullyRecharged
- The value to be set in the copy.- Returns:
- A copy of this object, differing in the given value.
-
equals
-
hashCode
public int hashCode() -
toString
-