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.onkyo.internal.eiscp;
16 * Class to handle Onkyo eISCP messages.
18 * @author Pauli Anttila - Initial contribution
20 public class EiscpMessage {
21 private String command = "";
22 private String value = "";
24 private EiscpMessage(MessageBuilder messageBuilder) {
25 this.command = messageBuilder.command;
26 this.value = messageBuilder.value;
29 public String getCommand() {
33 public void setCommand(String command) {
34 this.command = command;
37 public String getValue() {
41 public void setValue(String value) {
46 public String toString() {
49 str += "command=" + command;
50 str += ", value=" + value;
56 public static class MessageBuilder {
57 private String command;
60 public MessageBuilder command(String command) {
61 this.command = command;
65 public MessageBuilder value(String value) {
70 public EiscpMessage build() {
71 return new EiscpMessage(this);