2 * Copyright (c) 2010-2022 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.revogi.internal.udp;
15 import java.util.Objects;
18 * The class {@link UdpResponseDTO} represents udp reponse we expect
20 * @author Andi Bräu - Initial contribution
22 public class UdpResponseDTO {
23 private final String answer;
24 private final String ipAddress;
26 public UdpResponseDTO(String answer, String ipAddress) {
28 this.ipAddress = ipAddress;
31 public String getAnswer() {
35 public String getIpAddress() {
40 public boolean equals(Object o) {
44 if (o == null || getClass() != o.getClass()) {
47 UdpResponseDTO that = (UdpResponseDTO) o;
48 return answer.equals(that.answer) && ipAddress.equals(that.ipAddress);
52 public int hashCode() {
53 return Objects.hash(answer, ipAddress);