org.bidib.wizard.model.status.AccessoryAspectStatus Maven / Gradle / Ivy
package org.bidib.wizard.model.status;
import org.bidib.jbidibc.messages.enums.MacroEnum;
public enum AccessoryAspectStatus implements BidibStatus {
// @formatter:off
START(MacroEnum.START, "start");
// @formatter:on
private final MacroEnum type;
private final String key;
AccessoryAspectStatus(MacroEnum type, String key) {
this.type = type;
this.key = key;
}
@Override
public MacroEnum getType() {
return type;
}
@Override
public String getKey() {
return key;
}
public static AccessoryAspectStatus valueOf(MacroEnum type) {
AccessoryAspectStatus result = null;
for (AccessoryAspectStatus e : values()) {
if (e.type == type) {
result = e;
break;
}
}
if (result == null) {
throw new IllegalArgumentException("cannot map " + type + " to a accessory aspect status");
}
return result;
}
@Override
public AccessoryAspectStatus[] getValues() {
return new AccessoryAspectStatus[] { START };
}
}