sidnet.models.energy.batteries
Class IdealBattery

java.lang.Object
  extended by sidnet.models.energy.batteries.IdealBattery
All Implemented Interfaces:
Battery, BatteryControl
Direct Known Subclasses:
LinearTimeDrainingBattery, PercentualTimeDrainingBattery

public class IdealBattery
extends java.lang.Object
implements Battery, BatteryControl


Field Summary
 double capacity
           
 double remainingEnergy
           
 double voltage
           
 
Fields inherited from interface sidnet.models.energy.batteries.Battery
EMPTY, FULL, INF
 
Constructor Summary
IdealBattery(double capacityMJ, double voltage)
           
 
Method Summary
 void deplete()
           
 void depleteAmount(double amount)
           
 double getCapacity_mJ()
           
 double getEnergyLevel_mJ()
           
 double getPercentageEnergyLevel()
           
 double getVoltage()
           
 void recharge(double amount)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

capacity

public final double capacity

remainingEnergy

public double remainingEnergy

voltage

public double voltage
Constructor Detail

IdealBattery

public IdealBattery(double capacityMJ,
                    double voltage)
Method Detail

depleteAmount

public void depleteAmount(double amount)
Specified by:
depleteAmount in interface BatteryControl

getEnergyLevel_mJ

public double getEnergyLevel_mJ()
Specified by:
getEnergyLevel_mJ in interface Battery

getPercentageEnergyLevel

public double getPercentageEnergyLevel()
Specified by:
getPercentageEnergyLevel in interface Battery

getCapacity_mJ

public double getCapacity_mJ()
Specified by:
getCapacity_mJ in interface Battery

deplete

public void deplete()
Specified by:
deplete in interface BatteryControl

recharge

public void recharge(double amount)
Specified by:
recharge in interface BatteryControl

getVoltage

public double getVoltage()
Specified by:
getVoltage in interface Battery