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.lametrictime.internal.api.local.dto;
15 import java.util.SortedMap;
17 import com.google.gson.annotations.SerializedName;
22 * @author Gregory Moyer - Initial contribution
26 @SerializedName("params")
27 private SortedMap<String, Parameter> parameters;
29 public String getId() {
33 public void setId(String id) {
37 public Action withId(String id) {
42 public SortedMap<String, Parameter> getParameters() {
46 public void setParameters(SortedMap<String, Parameter> parameters) {
47 this.parameters = parameters;
50 public Action withParameters(SortedMap<String, Parameter> parameters) {
51 setParameters(parameters);
56 public int hashCode() {
59 result = prime * result + ((id == null) ? 0 : id.hashCode());
60 result = prime * result + ((parameters == null) ? 0 : parameters.hashCode());
65 public boolean equals(Object obj) {
72 if (getClass() != obj.getClass()) {
75 Action other = (Action) obj;
77 if (other.id != null) {
80 } else if (!id.equals(other.id)) {
83 if (parameters == null) {
84 if (other.parameters != null) {
87 } else if (!parameters.equals(other.parameters)) {
94 public String toString() {
95 StringBuilder builder = new StringBuilder();
96 builder.append("Action [id=");
98 builder.append(", parameters=");
99 builder.append(parameters);
101 return builder.toString();