public class BatteryCopy extends java.lang.Object implements IBatteryObject
| Constructor and Description |
|---|
BatteryCopy(IBatteryObject orignal) |
| Modifier and Type | Method and Description |
|---|---|
double |
addEnergy(double mj)
Add energy to this battery
|
double |
addEnergy(double mj,
boolean ignoreCycleLimit)
Add energy to this battery
|
double |
getEnergyRequested() |
double |
getEnergyStored() |
void |
init(java.lang.Object object,
java.lang.reflect.Field storedField,
MjBattery battery)
Basic initialization method
|
java.lang.String |
kind() |
double |
maxCapacity() |
double |
maxReceivedPerCycle() |
double |
minimumConsumption() |
void |
setEnergyStored(double mj)
Set current stored energy amount.
|
public BatteryCopy(IBatteryObject orignal)
public double getEnergyRequested()
getEnergyRequested in interface IBatteryObjectpublic double addEnergy(double mj)
IBatteryObjectaddEnergy in interface IBatteryObjectmj - Energy amountpublic double addEnergy(double mj,
boolean ignoreCycleLimit)
IBatteryObjectaddEnergy in interface IBatteryObjectmj - Energy amountignoreCycleLimit - Force add all energy even if "maxReceivedPerCycle" limit is reachedpublic double getEnergyStored()
getEnergyStored in interface IBatteryObjectpublic void setEnergyStored(double mj)
IBatteryObjectsetEnergyStored in interface IBatteryObjectmj - New energy amountpublic double maxCapacity()
maxCapacity in interface IBatteryObjectpublic double minimumConsumption()
minimumConsumption in interface IBatteryObjectpublic double maxReceivedPerCycle()
maxReceivedPerCycle in interface IBatteryObjectpublic java.lang.String kind()
kind in interface IBatteryObjectpublic void init(java.lang.Object object,
java.lang.reflect.Field storedField,
MjBattery battery)
IBatteryObjectinit in interface IBatteryObjectobject - Basic object which hold a battery fieldstoredField - Field for energy storingbattery - Battery data