Commit 4c4a719e authored by Julian Zobel's avatar Julian Zobel
Browse files

Added function to all batteries, to retrieve the maximum possible capacity.

parent 1de811e3
......@@ -29,6 +29,13 @@ package de.tud.kom.p2psim.impl.energy;
*/
public interface Battery extends Cloneable {
/**
* Returns the maximum energy level in uJ.
*
* @return the maximum capacity of the battery in uJ
*/
public double getMaximumEnergyLevel();
/**
* Returns the current status of the Battery as a Percentage-Value
*
......
......@@ -107,4 +107,9 @@ public class SimpleBattery implements Battery {
return new SimpleBattery(capacity / 1000000, initialEnergy / 1000000);
}
@Override
public double getMaximumEnergyLevel() {
return initialEnergy;
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment