2 * Copyright (c) 2010-2023 Contributors to the openHAB project
4 * See the NOTICE file(s) distributed with this work for additional
7 * This program and the accompanying materials are made available under the
8 * terms of the Eclipse Public License 2.0 which is available at
9 * http://www.eclipse.org/legal/epl-2.0
11 * SPDX-License-Identifier: EPL-2.0
13 package org.openhab.binding.hue.internal.dto.clip2.enums;
17 import org.eclipse.jdt.annotation.NonNullByDefault;
18 import org.eclipse.jdt.annotation.Nullable;
21 * Enum for 'effect' types.
23 * @author Andrew Fiddian-Green - Initial contribution
26 public enum EffectType {
36 private static final Set<EffectType> FIXED = Set.of(SPARKLE, FIRE, CANDLE);
37 private static final Set<EffectType> TIMED = Set.of(SUNRISE);
39 public static EffectType of(@Nullable String value) {
42 return valueOf(value.toUpperCase());
43 } catch (IllegalArgumentException e) {
50 public boolean isFixed() {
51 return FIXED.contains(this);
54 public boolean isTimed() {
55 return TIMED.contains(this);