Commit a5c7e481 authored by Julian Zobel's avatar Julian Zobel
Browse files

Moved Battery Interface where it belongs (to the interfaces!)

parent 1a516dc5
...@@ -18,7 +18,9 @@ ...@@ -18,7 +18,9 @@
* *
*/ */
package de.tud.kom.p2psim.impl.energy; package de.tud.kom.p2psim.api.energy;
import java.nio.channels.UnsupportedAddressTypeException;
/** /**
* This interface implements basic methods used by the EnergyModel to simulate a * This interface implements basic methods used by the EnergyModel to simulate a
...@@ -60,7 +62,9 @@ public interface Battery extends Cloneable { ...@@ -60,7 +62,9 @@ public interface Battery extends Cloneable {
/** /**
* Resets the Battery to the initial Energy-Level * Resets the Battery to the initial Energy-Level
*/ */
public void reset(); default public void reset() {
throw new UnsupportedOperationException();
}
/** /**
* Sets the battery to a given percentage. * Sets the battery to a given percentage.
...@@ -92,4 +96,11 @@ public interface Battery extends Cloneable { ...@@ -92,4 +96,11 @@ public interface Battery extends Cloneable {
* @return * @return
*/ */
public Battery clone(); public Battery clone();
/**
* Returns true, if the battery is fully charged.
*
* @return
*/
public boolean isFullyCharged();
} }
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