Remove redundant modifiers from interfaces (#14843)

Signed-off-by: Wouter Born <github@maindrain.net>
This commit is contained in:
Wouter Born
2023-04-18 13:07:04 +02:00
committed by GitHub
parent 24adc5aa12
commit 83cbe746d0
174 changed files with 806 additions and 774 deletions

View File

@@ -31,54 +31,54 @@ public interface HomematicGateway {
/**
* Initializes the Homematic gateway and starts the watchdog thread.
*/
public void initialize() throws IOException;
void initialize() throws IOException;
/**
* Disposes the HomematicGateway and stops everything.
*/
public void dispose();
void dispose();
/**
* Returns the cached datapoint.
*/
public HmDatapoint getDatapoint(HmDatapointInfo dpInfo) throws HomematicClientException;
HmDatapoint getDatapoint(HmDatapointInfo dpInfo) throws HomematicClientException;
/**
* Returns the cached device.
*/
public HmDevice getDevice(String address) throws HomematicClientException;
HmDevice getDevice(String address) throws HomematicClientException;
/**
* Cancel loading all device metadata.
*/
public void cancelLoadAllDeviceMetadata();
void cancelLoadAllDeviceMetadata();
/**
* Loads all device, channel and datapoint metadata from the gateway.
*/
public void loadAllDeviceMetadata() throws IOException;
void loadAllDeviceMetadata() throws IOException;
/**
* Loads all values into the given channel.
*/
public void loadChannelValues(HmChannel channel) throws IOException;
void loadChannelValues(HmChannel channel) throws IOException;
/**
* Loads the value of the given {@link HmDatapoint} from the device.
*
* @param dp The HmDatapoint that shall be loaded
*/
public void loadDatapointValue(HmDatapoint dp) throws IOException;
void loadDatapointValue(HmDatapoint dp) throws IOException;
/**
* Reenumerates the set of VALUES datapoints for the given channel.
*/
public void updateChannelValueDatapoints(HmChannel channel) throws IOException;
void updateChannelValueDatapoints(HmChannel channel) throws IOException;
/**
* Prepares the device for reloading all values from the gateway.
*/
public void triggerDeviceValuesReload(HmDevice device);
void triggerDeviceValuesReload(HmDevice device);
/**
* Sends the datapoint to the Homematic gateway or executes virtual datapoints.
@@ -91,13 +91,13 @@ public interface HomematicGateway {
* {@link HomematicBindingConstants#RX_WAKEUP_MODE "WAKEUP"} for wakeup mode, or null for the default
* mode)
*/
public void sendDatapoint(HmDatapoint dp, HmDatapointConfig dpConfig, Object newValue, String rxMode)
void sendDatapoint(HmDatapoint dp, HmDatapointConfig dpConfig, Object newValue, String rxMode)
throws IOException, HomematicClientException;
/**
* Returns the id of the HomematicGateway.
*/
public String getId();
String getId();
/**
* Set install mode of homematic controller. During install mode the
@@ -108,7 +108,7 @@ public interface HomematicGateway {
* @param seconds specify how long the install mode should last
* @throws IOException if RpcClient fails to propagate command
*/
public void setInstallMode(boolean enable, int seconds) throws IOException;
void setInstallMode(boolean enable, int seconds) throws IOException;
/**
* Get current install mode of homematic contoller
@@ -118,17 +118,17 @@ public interface HomematicGateway {
* <i>install_mode==false</i>
* @throws IOException if RpcClient fails to propagate command
*/
public int getInstallMode() throws IOException;
int getInstallMode() throws IOException;
/**
* Loads all rssi values from the gateway.
*/
public void loadRssiValues() throws IOException;
void loadRssiValues() throws IOException;
/**
* Starts the connection and event tracker threads.
*/
public void startWatchdogs();
void startWatchdogs();
/**
* Deletes the device from the gateway.
@@ -138,5 +138,5 @@ public interface HomematicGateway {
* @param force <i>true</i> will delete the device even if it is not reachable.
* @param defer <i>true</i> will delete the device once it becomes available.
*/
public void deleteDevice(String address, boolean reset, boolean force, boolean defer);
void deleteDevice(String address, boolean reset, boolean force, boolean defer);
}

View File

@@ -26,50 +26,50 @@ public interface HomematicGatewayAdapter {
/**
* Called when a datapoint has been updated.
*/
public void onStateUpdated(HmDatapoint dp);
void onStateUpdated(HmDatapoint dp);
/**
* Called when a new device has been detected on the gateway.
*/
public void onNewDevice(HmDevice device);
void onNewDevice(HmDevice device);
/**
* Called when a device has been deleted from the gateway.
*/
public void onDeviceDeleted(HmDevice device);
void onDeviceDeleted(HmDevice device);
/**
* Called when the devices values should be reloaded from the gateway.
*/
public void reloadDeviceValues(HmDevice device);
void reloadDeviceValues(HmDevice device);
/**
* Called when all values for all devices should be reloaded from the gateway.
*/
public void reloadAllDeviceValues();
void reloadAllDeviceValues();
/**
* Called when a device has been loaded from the gateway.
*/
public void onDeviceLoaded(HmDevice device);
void onDeviceLoaded(HmDevice device);
/**
* Called when the connection is lost to the gateway.
*/
public void onConnectionLost();
void onConnectionLost();
/**
* Called when the connection is resumed to the gateway.
*/
public void onConnectionResumed();
void onConnectionResumed();
/**
* Returns the configuration of a datapoint.
*/
public HmDatapointConfig getDatapointConfig(HmDatapoint dp);
HmDatapointConfig getDatapointConfig(HmDatapoint dp);
/**
* Called when a new value for the duty cycle of the gateway has been received.
*/
public void onDutyCycleRatioUpdate(int dutyCycleRatio);
void onDutyCycleRatioUpdate(int dutyCycleRatio);
}

View File

@@ -22,15 +22,15 @@ public interface RpcRequest<T> {
/**
* Adds arguments to the RPC method.
*/
public void addArg(Object arg);
void addArg(Object arg);
/**
* Generates the RPC data.
*/
public T createMessage();
T createMessage();
/**
* Returns the name of the rpc method.
*/
public String getMethodName();
String getMethodName();
}

View File

@@ -22,10 +22,10 @@ public interface RpcResponse {
/**
* Returns the decoded methodName.
*/
public String getMethodName();
String getMethodName();
/**
* Returns the decoded data.
*/
public Object[] getResponseData();
Object[] getResponseData();
}

View File

@@ -24,5 +24,5 @@ public interface RpcParser<M, R> {
/**
* Parses the message returns the result.
*/
public R parse(M message) throws IOException;
R parse(M message) throws IOException;
}

View File

@@ -26,15 +26,15 @@ public interface RpcEventListener {
/**
* Called when a new event is received from a Homeamtic gateway.
*/
public void eventReceived(HmDatapointInfo dpInfo, Object newValue);
void eventReceived(HmDatapointInfo dpInfo, Object newValue);
/**
* Called when new devices has been detected on the Homeamtic gateway.
*/
public void newDevices(List<String> adresses);
void newDevices(List<String> adresses);
/**
* Called when devices has been deleted from the Homeamtic gateway.
*/
public void deleteDevices(List<String> addresses);
void deleteDevices(List<String> addresses);
}

View File

@@ -24,10 +24,10 @@ public interface RpcServer {
/**
* Starts the rpc server.
*/
public void start() throws IOException;
void start() throws IOException;
/**
* Stops the rpc server.
*/
public void shutdown();
void shutdown();
}

View File

@@ -31,36 +31,36 @@ public interface VirtualDatapointHandler {
/**
* Returns the virtual datapoint name.
*/
public String getName();
String getName();
/**
* Adds the virtual datapoint to the device.
*/
public void initialize(HmDevice device);
void initialize(HmDevice device);
/**
* Returns true, if the virtual datapoint can handle a command for the given datapoint.
*/
public boolean canHandleCommand(HmDatapoint dp, Object value);
boolean canHandleCommand(HmDatapoint dp, Object value);
/**
* Handles the special functionality for the given virtual datapoint.
*/
public void handleCommand(VirtualGateway gateway, HmDatapoint dp, HmDatapointConfig dpConfig, Object value)
void handleCommand(VirtualGateway gateway, HmDatapoint dp, HmDatapointConfig dpConfig, Object value)
throws IOException, HomematicClientException;
/**
* Returns true, if the virtual datapoint can handle the event for the given datapoint.
*/
public boolean canHandleEvent(HmDatapoint dp);
boolean canHandleEvent(HmDatapoint dp);
/**
* Handles an event to extract data required for the virtual datapoint.
*/
public void handleEvent(VirtualGateway gateway, HmDatapoint dp);
void handleEvent(VirtualGateway gateway, HmDatapoint dp);
/**
* Returns the virtual datapoint in the given channel.
*/
public HmDatapoint getVirtualDatapoint(HmChannel channel);
HmDatapoint getVirtualDatapoint(HmChannel channel);
}

View File

@@ -32,21 +32,21 @@ public interface VirtualGateway extends HomematicGateway {
/**
* Sends the datapoint from a virtual datapoint.
*/
public void sendDatapointIgnoreVirtual(HmDatapoint dp, HmDatapointConfig dpConfig, Object newValue)
void sendDatapointIgnoreVirtual(HmDatapoint dp, HmDatapointConfig dpConfig, Object newValue)
throws IOException, HomematicClientException;
/**
* Returns the rpc client.
*/
public RpcClient<?> getRpcClient(HmInterface hmInterface) throws IOException;
RpcClient<?> getRpcClient(HmInterface hmInterface) throws IOException;
/**
* Disables a boolean datapoint by setting the value to false after a given delay.
*/
public void disableDatapoint(HmDatapoint dp, double delay);
void disableDatapoint(HmDatapoint dp, double delay);
/**
* Returns the event listener.
*/
public HomematicGatewayAdapter getGatewayAdapter();
HomematicGatewayAdapter getGatewayAdapter();
}

View File

@@ -26,10 +26,10 @@ public interface TypeConverter<T extends State> {
/**
* Converts an openHAB type to a Homematic value.
*/
public Object convertToBinding(Type type, HmDatapoint dp) throws ConverterException;
Object convertToBinding(Type type, HmDatapoint dp) throws ConverterException;
/**
* Converts a Homematic value to an openHAB type.
*/
public T convertFromBinding(HmDatapoint dp) throws ConverterException;
T convertFromBinding(HmDatapoint dp) throws ConverterException;
}

View File

@@ -26,7 +26,7 @@ public interface HomematicChannelGroupTypeProvider extends ChannelGroupTypeProvi
/**
* Adds the ChannelGroupType to this provider.
*/
public void addChannelGroupType(ChannelGroupType channelGroupType);
void addChannelGroupType(ChannelGroupType channelGroupType);
/**
* Use this method to lookup a ChannelGroupType which was generated by the
@@ -41,5 +41,5 @@ public interface HomematicChannelGroupTypeProvider extends ChannelGroupTypeProvi
* <i>null</i> if no ChannelGroupType with the given UID was added
* before
*/
public ChannelGroupType getInternalChannelGroupType(ChannelGroupTypeUID channelGroupTypeUID);
ChannelGroupType getInternalChannelGroupType(ChannelGroupTypeUID channelGroupTypeUID);
}

View File

@@ -26,7 +26,7 @@ public interface HomematicChannelTypeProvider extends ChannelTypeProvider {
/**
* Adds the ChannelType to this provider.
*/
public void addChannelType(ChannelType channelType);
void addChannelType(ChannelType channelType);
/**
* Use this method to lookup a ChannelType which was generated by the
@@ -41,5 +41,5 @@ public interface HomematicChannelTypeProvider extends ChannelTypeProvider {
* <i>null</i> if no ChannelType with the given UID was added
* before
*/
public ChannelType getInternalChannelType(ChannelTypeUID channelTypeUID);
ChannelType getInternalChannelType(ChannelTypeUID channelTypeUID);
}

View File

@@ -29,7 +29,7 @@ public interface HomematicConfigDescriptionProvider extends ConfigDescriptionPro
/**
* Adds the ConfigDescription to this provider.
*/
public void addConfigDescription(ConfigDescription configDescription);
void addConfigDescription(ConfigDescription configDescription);
/**
* Provides a {@link ConfigDescription} for the given URI.
@@ -56,5 +56,5 @@ public interface HomematicConfigDescriptionProvider extends ConfigDescriptionPro
* <i>null</i> if no ConfigDescription with the given URI was added
* before
*/
public ConfigDescription getInternalConfigDescription(URI uri);
ConfigDescription getInternalConfigDescription(URI uri);
}

View File

@@ -26,7 +26,7 @@ public interface HomematicThingTypeProvider extends ThingTypeProvider {
/**
* Adds the ThingType to this provider.
*/
public void addThingType(ThingType thingType);
void addThingType(ThingType thingType);
/**
* Use this method to lookup a ThingType which was generated by the
@@ -41,5 +41,5 @@ public interface HomematicThingTypeProvider extends ThingTypeProvider {
* <i>null</i> if no ThingType with the given thingTypeUID was added
* before
*/
public ThingType getInternalThingType(ThingTypeUID thingTypeUID);
ThingType getInternalThingType(ThingTypeUID thingTypeUID);
}

View File

@@ -23,16 +23,16 @@ public interface HomematicTypeGenerator {
/**
* Initializes the type generator.
*/
public void initialize();
void initialize();
/**
* Generates the ThingType and ChannelTypes for the given device.
*/
public void generate(HmDevice device);
void generate(HmDevice device);
/**
* Validates all devices for multiple firmware versions. Different firmware versions for the same device may have
* different datapoints which may cause warnings in the logfile.
*/
public void validateFirmwares();
void validateFirmwares();
}

View File

@@ -48,7 +48,7 @@ public interface HomematicThingTypeExcluder {
* @return {@link ThingTypeUID}s of ThingTypes that are supposed to be
* excluded from the binding's thing-type generation
*/
public Set<ThingTypeUID> getExcludedThingTypes();
Set<ThingTypeUID> getExcludedThingTypes();
/**
* Check for the given {@link ThingTypeUID} whether it is excluded by this
@@ -57,7 +57,7 @@ public interface HomematicThingTypeExcluder {
* @param thingType a specific ThingType, specified by its {@link ThingTypeUID}
* @return <i>true</i>, if the {@link ThingType} is excluded
*/
public boolean isThingTypeExcluded(ThingTypeUID thingType);
boolean isThingTypeExcluded(ThingTypeUID thingType);
/**
* Check for the given {@link ChannelTypeUID} whether it is excluded by this
@@ -67,7 +67,7 @@ public interface HomematicThingTypeExcluder {
* @return <i>true</i>, if the {@link org.openhab.core.thing.type.ChannelType} is
* excluded
*/
public boolean isChannelTypeExcluded(ChannelTypeUID channelType);
boolean isChannelTypeExcluded(ChannelTypeUID channelType);
/**
* Check for the given {@link ChannelGroupTypeUID} whether it is excluded by
@@ -78,7 +78,7 @@ public interface HomematicThingTypeExcluder {
* {@link org.openhab.core.thing.type.ChannelGroupType} is
* excluded
*/
public boolean isChannelGroupTypeExcluded(ChannelGroupTypeUID channelGroupType);
boolean isChannelGroupTypeExcluded(ChannelGroupTypeUID channelGroupType);
/**
* Check for the given config-description-{@link URI} whether it is excluded by
@@ -88,5 +88,5 @@ public interface HomematicThingTypeExcluder {
* @return <i>true</i>, if the {@link org.openhab.core.config.core.ConfigDescription} is
* excluded
*/
public boolean isConfigDescriptionExcluded(URI configDescriptionURI);
boolean isConfigDescriptionExcluded(URI configDescriptionURI);
}