public class MjBatteryReceiver extends java.lang.Object implements IMjReceiver, IMjReadable
| Constructor and Description |
|---|
MjBatteryReceiver(MjBattery battery) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canConnect(IMjConnector other)
Checks to see if this connector can connect to the other connector.
|
long |
getCapacity() |
long |
getPowerRequested() |
long |
getStored() |
long |
receivePower(long microJoules,
boolean simulate)
Receives power.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcanReceivepublic MjBatteryReceiver(MjBattery battery)
public boolean canConnect(@Nonnull
IMjConnector other)
IMjConnectorcanConnect in interface IMjConnectorpublic long getPowerRequested()
getPowerRequested in interface IMjReceiverpublic long receivePower(long microJoules,
boolean simulate)
IMjReceiverMjBattery for later usage.
MjBattery is full).
IMjReceiver.canReceive() before calling this - implementors should check
all of the conditions in IMjReceiver.canReceive() before accepting power.receivePower in interface IMjReceivermicroJoules - The number of micro joules to add.simulate - If true then just pretend you received power- don't actually change any of your internal state.public long getStored()
getStored in interface IMjReadablepublic long getCapacity()
getCapacity in interface IMjReadable