2 * Copyright (c) 2010-2024 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.mercedesme.internal.utils;
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.openhab.core.types.State;
19 * The {@link ChannelStateMap} holds the necessary values to update a channel state
21 * @author Bernd Weymann - Initial contribution
24 public class ChannelStateMap {
25 private String channel;
28 private long timestamp;
30 public ChannelStateMap(String ch, String grp, State st, long ts) {
37 public String getChannel() {
41 public String getGroup() {
45 public State getState() {
49 public long getTimestamp() {
54 public String toString() {
55 return group + ":" + channel + " " + state;
58 public boolean isValid() {
59 return !channel.isEmpty();