Skip to content

Commit

Permalink
Added 'RefreshType.REFRESH' and 'BinaryPrefix' to imports (#854)
Browse files Browse the repository at this point in the history
Signed-off-by: Christoph Weitkamp <[email protected]>
  • Loading branch information
cweitkamp authored and maggu2810 committed Jun 5, 2019
1 parent edd148f commit 306165d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import java.util.List;

import org.apache.commons.lang.StringUtils;
import org.eclipse.smarthome.core.library.unit.BinaryPrefix;
import org.eclipse.smarthome.core.library.unit.ImperialUnits;
import org.eclipse.smarthome.core.library.unit.MetricPrefix;
import org.eclipse.smarthome.core.library.unit.SIUnits;
Expand Down Expand Up @@ -106,6 +107,7 @@ protected List<Class<?>> getStaticImportClasses() {
result.add(MetricPrefix.class);
result.add(SIUnits.class);
result.add(SmartHomeUnits.class);
result.add(BinaryPrefix.class);

// jodatime static functions
result.add(DateTime.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import org.eclipse.smarthome.core.library.types.StopMoveType;
import org.eclipse.smarthome.core.library.types.UpDownType;
import org.eclipse.smarthome.core.types.Command;
import org.eclipse.smarthome.core.types.RefreshType;
import org.eclipse.smarthome.core.types.State;
import org.eclipse.smarthome.core.types.Type;
import org.eclipse.smarthome.core.types.UnDefType;
Expand All @@ -35,15 +36,14 @@
* name).
* A future version might gather the sets through an extension mechanism, for the moment it is simply statically coded.
*
* @author Kai Kreuzer - Initial contribution and API
*
* @author Kai Kreuzer - Initial contribution
*/
@Singleton
public class StateAndCommandProvider {

final static protected Set<Command> COMMANDS = new HashSet<Command>();
final static protected Set<State> STATES = new HashSet<State>();
final static protected Set<Type> TYPES = new HashSet<Type>();
protected static final Set<Command> COMMANDS = new HashSet<>();
protected static final Set<State> STATES = new HashSet<>();
protected static final Set<Type> TYPES = new HashSet<>();

static {
COMMANDS.add(OnOffType.ON);
Expand All @@ -60,6 +60,7 @@ public class StateAndCommandProvider {
COMMANDS.add(NextPreviousType.PREVIOUS);
COMMANDS.add(RewindFastforwardType.REWIND);
COMMANDS.add(RewindFastforwardType.FASTFORWARD);
COMMANDS.add(RefreshType.REFRESH);

STATES.add(UnDefType.UNDEF);
STATES.add(UnDefType.NULL);
Expand Down

0 comments on commit 306165d

Please sign in to comment.