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.squeezebox.internal.model;
16 * Attributes of a Squeezebox Server favorite
18 * @author Mark Hilbush - Initial contribution
21 public class Favorite {
23 * Favorite id is of form xxxxxxxx.nn
28 * Just the nn part of the id
30 public String shortId;
33 * The name given to the favorite in the Squeezebox Server.
38 * Creates a preset from the given favorite id
40 * @param id Squeezebox Server internal identifier for favorite
42 public Favorite(String id) {
45 if (id.indexOf(".") != -1) {
46 this.shortId = id.substring(id.indexOf(".") + 1);
51 public String toString() {
52 StringBuilder sb = new StringBuilder();
53 sb.append("Favorite {id=").append(id).append(", shortId=").append(shortId).append(", name=").append(name)