public class DefaultEnergyProfile extends Object implements IEnergyProfile
Constructor and Description |
---|
DefaultEnergyProfile(int powerRate,
long maxEnergyLevel,
long minEnergylevel,
long startLevel) |
Modifier and Type | Method and Description |
---|---|
long |
getCurrentEnergyLevel() |
IEnergyConsumptionProfile |
getGlobalEnergyConsumptionProfile() |
long |
getMaxEnergyLevel() |
long |
getMinEnergyLevel() |
String |
getName() |
long |
getPowerRate() |
long |
getStartEnergyLevel() |
long |
howLongCanExecute(ITask... tasks) |
long |
howLongCanExecute(Iterable<ITask> tasks) |
long |
howLongCanExecute(long maxEnergyToConsume,
ITask... tasks) |
long |
howLongCanExecute(long maxEnergyToConsume,
Iterable<ITask> tasks) |
long |
howMuchCanRecharge(long duration) |
boolean |
isGolobalConsumptionProfile() |
IEnergyProfile |
newInstance(int... params) |
void |
reset() |
void |
setGlobalEnergyConsumptionProfile(IEnergyConsumptionProfile p) |
void |
setGolobalConsumptionProfileEnabled(boolean bool) |
void |
updateEnergy(long duration,
long consumption,
long date) |
public DefaultEnergyProfile(int powerRate, long maxEnergyLevel, long minEnergylevel, long startLevel)
public long getMaxEnergyLevel()
getMaxEnergyLevel
in interface IEnergyProfile
public long getMinEnergyLevel()
getMinEnergyLevel
in interface IEnergyProfile
public long getCurrentEnergyLevel()
getCurrentEnergyLevel
in interface IEnergyProfile
public long getPowerRate()
getPowerRate
in interface IEnergyProfile
public void updateEnergy(long duration, long consumption, long date)
updateEnergy
in interface IEnergyProfile
duration
- consumption
- public long howLongCanExecute(Iterable<ITask> tasks)
howLongCanExecute
in interface IEnergyProfile
public long howLongCanExecute(ITask... tasks)
howLongCanExecute
in interface IEnergyProfile
public long howLongCanExecute(long maxEnergyToConsume, ITask... tasks)
howLongCanExecute
in interface IEnergyProfile
public long howLongCanExecute(long maxEnergyToConsume, Iterable<ITask> tasks)
howLongCanExecute
in interface IEnergyProfile
public void reset()
reset
in interface IEnergyProfile
public long howMuchCanRecharge(long duration)
howMuchCanRecharge
in interface IEnergyProfile
public long getStartEnergyLevel()
getStartEnergyLevel
in interface IEnergyProfile
public boolean isGolobalConsumptionProfile()
isGolobalConsumptionProfile
in interface IEnergyProfile
public void setGolobalConsumptionProfileEnabled(boolean bool)
setGolobalConsumptionProfileEnabled
in interface IEnergyProfile
public IEnergyConsumptionProfile getGlobalEnergyConsumptionProfile()
getGlobalEnergyConsumptionProfile
in interface IEnergyProfile
public void setGlobalEnergyConsumptionProfile(IEnergyConsumptionProfile p)
setGlobalEnergyConsumptionProfile
in interface IEnergyProfile
public IEnergyProfile newInstance(int... params)
newInstance
in interface IEnergyProfile
public String getName()
getName
in interface IEnergyProfile
Copyright © 2012. All Rights Reserved.