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.minecraft.internal.message.data;
16 * Object representing a tracked Minecraft sign.
18 * @author Mattias Markehed - Initial contribution
20 public class SignData {
23 private boolean state;
26 * Creates a representation of sign.
28 * @param name text on sign.
29 * @param state true if powered by redstone else false.
31 public SignData(String name, boolean state) {
41 public String getName() {
46 * The active sign of state.
48 * @return true if powered by redstone
50 public boolean getState() {
55 public int hashCode() {
58 result = prime * result + ((name == null) ? 0 : name.hashCode());
63 public boolean equals(Object obj) {
70 if (getClass() != obj.getClass()) {
73 SignData other = (SignData) obj;
75 if (other.name != null) {
78 } else if (!name.equals(other.name)) {