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.unifi.internal.api.cache;
15 import static org.openhab.binding.unifi.internal.api.cache.UniFiCache.Prefix.MAC;
17 import org.eclipse.jdt.annotation.NonNullByDefault;
18 import org.eclipse.jdt.annotation.Nullable;
19 import org.openhab.binding.unifi.internal.api.dto.UniFiDevice;
22 * The {@link UniFiDeviceCache} is a specific implementation of {@link UniFiCache} for the purpose of caching
23 * {@link UniFiDevice} instances.
25 * The cache uses the following prefixes: <code>mac</code>
27 * @author Matthew Bowman - Initial contribution
30 class UniFiDeviceCache extends UniFiCache<UniFiDevice> {
32 public UniFiDeviceCache() {
37 protected @Nullable String getSuffix(final UniFiDevice device, final Prefix prefix) {
40 return device.getMac();