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.plugwise.internal.protocol.field;
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.eclipse.jdt.annotation.Nullable;
19 * The media access control (MAC) address of a Plugwise device, e.g.: 000D6F0000A1B2C3
21 * @author Wouter Born - Initial contribution
24 public class MACAddress {
26 private final String macAddress;
28 public MACAddress(String macAddress) {
29 this.macAddress = macAddress.toUpperCase();
33 public int hashCode() {
36 result = prime * result + macAddress.hashCode();
40 @SuppressWarnings("PMD.SimplifyBooleanReturns")
42 public boolean equals(@Nullable Object obj) {
49 if (getClass() != obj.getClass()) {
52 MACAddress other = (MACAddress) obj;
53 if (!macAddress.equals(other.macAddress)) {
60 public String toString() {