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.icalendar.internal.logic;
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.eclipse.jdt.annotation.Nullable;
19 * A type enumerator to indicate whether a Command Tag is of type BEGIN or END; as in the following examples:
23 * BEGIN:<item_name>:<new_state>
24 * END:<item_name>:<new_state>
28 * @author Andrew Fiddian-Green - Initial contribution
31 public enum CommandTagType {
35 public static boolean prefixValid(@Nullable String line) {
36 return (line != null) && (line.startsWith(BEGIN.toString()) || line.startsWith(END.toString()));