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.astro.internal.job;
15 import org.eclipse.jdt.annotation.NonNullByDefault;
18 * This class contains the default methods required for different jobs
20 * @author Amit Kumar Mondal - Initial contribution
23 public abstract class AbstractJob implements Job {
25 private final String thingUID;
27 public AbstractJob(String thingUID) {
28 this.thingUID = thingUID;
32 public String getThingUID() {
37 * Ensures the truth of an expression involving one or more parameters to the
40 * @param expression a boolean expression
41 * @param errorMessage the exception message to use if the check fails
42 * @throws IllegalArgumentException if {@code expression} is false
44 public static void checkArgument(boolean expression, String errorMessage) {
46 throw new IllegalArgumentException(errorMessage);