Added missing JavaDoc to 'createGroupStateChangedEvent' method (#1276)

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
This commit is contained in:
Christoph Weitkamp
2019-12-18 23:04:09 +01:00
committed by Wouter Born
parent f32d779894
commit 7130988901
3 changed files with 15 additions and 5 deletions
@@ -15,8 +15,7 @@ package org.eclipse.smarthome.core.items.events;
import org.eclipse.smarthome.core.types.State;
/**
* {@link GroupItemStateChangedEvent}s can be used to deliver group item state changes through the openHAB
* event bus. In
* {@link GroupItemStateChangedEvent}s can be used to deliver group item state changes through the openHAB event bus. In
* contrast to the {@link GroupItemStateEvent} the {@link GroupItemStateChangedEvent} is only sent if the state changed.
* State events must be created with the {@link ItemEventFactory}.
*
@@ -53,4 +52,5 @@ public class GroupItemStateChangedEvent extends ItemStateChangedEvent {
public String toString() {
return String.format("%s through %s", super.toString(), memberName);
}
}
@@ -304,6 +304,16 @@ public class ItemEventFactory extends AbstractEventFactory {
return new ItemStateChangedEvent(topic, payload, itemName, newState, oldState);
}
/**
* Creates a group item state changed event.
*
* @param itemName the name of the group item to send the state changed event for
* @param memberName the name of the member causing the group item state change
* @param newState the new state to send
* @param oldState the old state of the group item
* @return the created group item state changed event
* @throws IllegalArgumentException if itemName or state is null
*/
public static GroupItemStateChangedEvent createGroupStateChangedEvent(String itemName, String memberName,
State newState, State oldState) {
assertValidArguments(itemName, memberName, newState, "state");
@@ -16,9 +16,9 @@ import org.eclipse.smarthome.core.events.AbstractEvent;
import org.eclipse.smarthome.core.types.State;
/**
* {@link ItemStateChangedEvent}s can be used to deliver item state changes through the openHAB event bus. In
* contrast to the {@link ItemStateEvent} the {@link ItemStateChangedEvent} is only sent if the state changed.
* State events must be created with the {@link ItemEventFactory}.
* {@link ItemStateChangedEvent}s can be used to deliver item state changes through the openHAB event bus. In contrast
* to the {@link ItemStateEvent} the {@link ItemStateChangedEvent} is only sent if the state changed. State events must
* be created with the {@link ItemEventFactory}.
*
* @author Dennis Nobel - Initial contribution
*/