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.nanoleaf.internal.model;
15 import java.util.Objects;
17 import org.eclipse.jdt.annotation.NonNullByDefault;
18 import org.eclipse.jdt.annotation.Nullable;
21 * Represents global orientation settings of the light panels
23 * @author Martin Raepple - Initial contribution
26 public class GlobalOrientation {
29 private @Nullable Integer max;
30 private @Nullable Integer min;
32 public GlobalOrientation() {
35 public GlobalOrientation(Integer min, Integer max, int value) {
41 public int getValue() {
45 public void setValue(int value) {
49 public @Nullable Integer getMax() {
53 public void setMax(Integer max) {
57 public @Nullable Integer getMin() {
61 public void setMin(Integer min) {
66 public boolean equals(@Nullable Object o) {
71 if (o == null || getClass() != o.getClass()) {
75 GlobalOrientation go = (GlobalOrientation) o;
76 return (value == go.getValue()) && (Objects.equals(min, go.getMin())) && (Objects.equals(max, go.getMax()));
80 public int hashCode() {
85 result = prime * result + value;
86 result = prime * result + ((x == null) ? 0 : x.hashCode());
87 result = prime * result + ((i == null) ? 0 : i.hashCode());