Remove redundant modifiers from interfaces (#14843)
Signed-off-by: Wouter Born <github@maindrain.net>
This commit is contained in:
@@ -42,21 +42,21 @@ public interface OpenSprinklerApi {
|
||||
*
|
||||
* @return True if this API interface is connected to the Open Sprinkler API. False otherwise.
|
||||
*/
|
||||
public abstract boolean isManualModeEnabled();
|
||||
boolean isManualModeEnabled();
|
||||
|
||||
/**
|
||||
* Enters the "manual" mode of the device so that API requests are accepted.
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
public abstract void enterManualMode() throws CommunicationApiException, UnauthorizedApiException;
|
||||
void enterManualMode() throws CommunicationApiException, UnauthorizedApiException;
|
||||
|
||||
/**
|
||||
* Disables the manual mode, if it is enabled.
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
public abstract void leaveManualMode() throws CommunicationApiException, UnauthorizedApiException;
|
||||
void leaveManualMode() throws CommunicationApiException, UnauthorizedApiException;
|
||||
|
||||
/**
|
||||
* Starts a station on the OpenSprinkler device for the specified duration.
|
||||
@@ -65,8 +65,7 @@ public interface OpenSprinklerApi {
|
||||
* @param duration The duration in seconds for how long the station should be turned on.
|
||||
* @throws Exception
|
||||
*/
|
||||
public abstract void openStation(int station, BigDecimal duration)
|
||||
throws CommunicationApiException, GeneralApiException;
|
||||
void openStation(int station, BigDecimal duration) throws CommunicationApiException, GeneralApiException;
|
||||
|
||||
/**
|
||||
* Closes a station on the OpenSprinkler device.
|
||||
@@ -74,7 +73,7 @@ public interface OpenSprinklerApi {
|
||||
* @param station Index of the station to open starting at 0.
|
||||
* @throws Exception
|
||||
*/
|
||||
public abstract void closeStation(int station) throws CommunicationApiException, GeneralApiException;
|
||||
void closeStation(int station) throws CommunicationApiException, GeneralApiException;
|
||||
|
||||
/**
|
||||
* Returns the state of a station on the OpenSprinkler device.
|
||||
@@ -83,7 +82,7 @@ public interface OpenSprinklerApi {
|
||||
* @return True if the station is open, false if it is closed or cannot determine.
|
||||
* @throws Exception
|
||||
*/
|
||||
public abstract boolean isStationOpen(int station) throws CommunicationApiException, GeneralApiException;
|
||||
boolean isStationOpen(int station) throws CommunicationApiException, GeneralApiException;
|
||||
|
||||
/**
|
||||
* Returns the current program data of the requested station.
|
||||
@@ -92,7 +91,7 @@ public interface OpenSprinklerApi {
|
||||
* @return StationProgram
|
||||
* @throws Exception
|
||||
*/
|
||||
public abstract StationProgram retrieveProgram(int station) throws CommunicationApiException;
|
||||
StationProgram retrieveProgram(int station) throws CommunicationApiException;
|
||||
|
||||
/**
|
||||
* Returns the state of rain detection on the OpenSprinkler device.
|
||||
@@ -100,55 +99,55 @@ public interface OpenSprinklerApi {
|
||||
* @return True if rain is detected, false if not or cannot determine.
|
||||
* @throws Exception
|
||||
*/
|
||||
public abstract boolean isRainDetected();
|
||||
boolean isRainDetected();
|
||||
|
||||
/**
|
||||
* Returns the current draw of all connected zones of the OpenSprinkler device in milliamperes.
|
||||
*
|
||||
* @return current draw in milliamperes or -1 if sensor not supported
|
||||
*/
|
||||
public abstract int currentDraw();
|
||||
int currentDraw();
|
||||
|
||||
/**
|
||||
* Returns the state of the second sensor.
|
||||
*
|
||||
* @return 1: sensor is active; 0: sensor is inactive; -1: no sensor.
|
||||
*/
|
||||
public abstract int getSensor2State();
|
||||
int getSensor2State();
|
||||
|
||||
/**
|
||||
*
|
||||
* @return The Wifi signal strength in -dB or 0 if not supported by firmware
|
||||
*/
|
||||
public abstract int signalStrength();
|
||||
int signalStrength();
|
||||
|
||||
/**
|
||||
*
|
||||
* @return The pulses that the flow sensor has given in the last time period, -1 if not supported.
|
||||
*/
|
||||
public abstract int flowSensorCount();
|
||||
int flowSensorCount();
|
||||
|
||||
/**
|
||||
* CLOSES all stations turning them all off.
|
||||
*
|
||||
*/
|
||||
public abstract void resetStations() throws UnauthorizedApiException, CommunicationApiException;
|
||||
void resetStations() throws UnauthorizedApiException, CommunicationApiException;
|
||||
|
||||
/**
|
||||
* Returns true if the internal programs are allowed to auto start.
|
||||
*
|
||||
* @return true if enabled
|
||||
*/
|
||||
public abstract boolean getIsEnabled();
|
||||
boolean getIsEnabled();
|
||||
|
||||
public abstract void enablePrograms(Command command) throws UnauthorizedApiException, CommunicationApiException;
|
||||
void enablePrograms(Command command) throws UnauthorizedApiException, CommunicationApiException;
|
||||
|
||||
/**
|
||||
* Returns the water level in %.
|
||||
*
|
||||
* @return waterLevel in %
|
||||
*/
|
||||
public abstract int waterLevel();
|
||||
int waterLevel();
|
||||
|
||||
/**
|
||||
* Returns the number of total stations that are controllable from the OpenSprinkler
|
||||
@@ -156,7 +155,7 @@ public interface OpenSprinklerApi {
|
||||
*
|
||||
* @return Number of stations as an int.
|
||||
*/
|
||||
public abstract int getNumberOfStations();
|
||||
int getNumberOfStations();
|
||||
|
||||
/**
|
||||
* Returns the firmware version number.
|
||||
@@ -164,7 +163,7 @@ public interface OpenSprinklerApi {
|
||||
* @return The firmware version of the OpenSprinkler device as an int.
|
||||
* @throws Exception
|
||||
*/
|
||||
public abstract int getFirmwareVersion() throws CommunicationApiException, UnauthorizedApiException;
|
||||
int getFirmwareVersion() throws CommunicationApiException, UnauthorizedApiException;
|
||||
|
||||
/**
|
||||
* Sends all the GET requests and stores/cache the responses for use by the API to prevent the need for multiple
|
||||
@@ -173,7 +172,7 @@ public interface OpenSprinklerApi {
|
||||
* @throws CommunicationApiException
|
||||
* @throws UnauthorizedApiException
|
||||
*/
|
||||
public abstract void refresh() throws CommunicationApiException, UnauthorizedApiException;
|
||||
void refresh() throws CommunicationApiException, UnauthorizedApiException;
|
||||
|
||||
/**
|
||||
* Ask the OpenSprinkler for the program names and store these for future use in a List.
|
||||
@@ -181,21 +180,21 @@ public interface OpenSprinklerApi {
|
||||
* @throws CommunicationApiException
|
||||
* @throws UnauthorizedApiException
|
||||
*/
|
||||
public abstract void getProgramData() throws CommunicationApiException, UnauthorizedApiException;
|
||||
void getProgramData() throws CommunicationApiException, UnauthorizedApiException;
|
||||
|
||||
/**
|
||||
* Returns a list of all internal programs as a list of StateOptions.
|
||||
*
|
||||
* @return List<StateOption>
|
||||
*/
|
||||
public abstract List<StateOption> getPrograms();
|
||||
List<StateOption> getPrograms();
|
||||
|
||||
/**
|
||||
* Return a list of all the stations the device has as List of StateOptions
|
||||
*
|
||||
* @return List<StateOption>
|
||||
*/
|
||||
public abstract List<StateOption> getStations();
|
||||
List<StateOption> getStations();
|
||||
|
||||
/**
|
||||
* Runs a Program that is setup and stored inside the OpenSprinkler
|
||||
@@ -205,7 +204,7 @@ public interface OpenSprinklerApi {
|
||||
* @throws CommunicationApiException
|
||||
* @throws UnauthorizedApiException
|
||||
*/
|
||||
public abstract void runProgram(Command command) throws CommunicationApiException, UnauthorizedApiException;
|
||||
void runProgram(Command command) throws CommunicationApiException, UnauthorizedApiException;
|
||||
|
||||
/**
|
||||
* Fetch the station names and place them in a list of List<StateOption>.
|
||||
@@ -214,7 +213,7 @@ public interface OpenSprinklerApi {
|
||||
* @throws CommunicationApiException
|
||||
* @throws UnauthorizedApiException
|
||||
*/
|
||||
public abstract JnResponse getStationNames() throws CommunicationApiException, UnauthorizedApiException;
|
||||
JnResponse getStationNames() throws CommunicationApiException, UnauthorizedApiException;
|
||||
|
||||
/**
|
||||
* Tells a single station to ignore the rain delay.
|
||||
@@ -224,7 +223,7 @@ public interface OpenSprinklerApi {
|
||||
* @throws CommunicationApiException
|
||||
* @throws UnauthorizedApiException
|
||||
*/
|
||||
public void ignoreRain(int station, boolean command) throws CommunicationApiException, UnauthorizedApiException;
|
||||
void ignoreRain(int station, boolean command) throws CommunicationApiException, UnauthorizedApiException;
|
||||
|
||||
/**
|
||||
* Asks if a single station is set to ignore rain delays.
|
||||
@@ -232,7 +231,7 @@ public interface OpenSprinklerApi {
|
||||
* @param station
|
||||
* @return
|
||||
*/
|
||||
public abstract boolean isIgnoringRain(int station);
|
||||
boolean isIgnoringRain(int station);
|
||||
|
||||
/**
|
||||
* Sets how long the OpenSprinkler device will stop running programs for.
|
||||
@@ -241,12 +240,12 @@ public interface OpenSprinklerApi {
|
||||
* @throws UnauthorizedApiException
|
||||
* @throws CommunicationApiException
|
||||
*/
|
||||
public abstract void setRainDelay(int hours) throws UnauthorizedApiException, CommunicationApiException;
|
||||
void setRainDelay(int hours) throws UnauthorizedApiException, CommunicationApiException;
|
||||
|
||||
/**
|
||||
* Gets the rain delay in hours from the OpenSprinkler device.
|
||||
*
|
||||
* @return QuantityType<Time>
|
||||
*/
|
||||
public abstract QuantityType<Time> getRainDelay();
|
||||
QuantityType<Time> getRainDelay();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user