io.github.zeroone3010.yahueapi.ButtonImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of yetanotherhueapi Show documentation
Show all versions of yetanotherhueapi Show documentation
A library for controlling Philips Hue lights.
package io.github.zeroone3010.yahueapi;
import java.util.Collections;
import java.util.List;
final class ButtonImpl implements Button {
static final ButtonImpl UNKNOWN = new ButtonImpl(-1, Collections.emptyList());
private final int buttonNumber;
private final List possibleEvents;
public ButtonImpl(final int buttonNumber, final List possibleEvents) {
this.buttonNumber = buttonNumber;
this.possibleEvents = possibleEvents;
}
@Override
public int getNumber() {
return buttonNumber;
}
@Override
public List getPossibleEvents() {
return possibleEvents;
}
@Override
public String toString() {
return "Button{" +
"buttonNumber=" + buttonNumber +
", possibleEvents=" + possibleEvents +
'}';
}
}