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.ahawastecollection.internal;
15 import java.io.IOException;
16 import java.util.Arrays;
17 import java.util.Date;
18 import java.util.GregorianCalendar;
19 import java.util.LinkedHashMap;
22 import org.eclipse.jdt.annotation.NonNullByDefault;
23 import org.openhab.binding.ahawastecollection.internal.CollectionDate.WasteType;
26 * @author Sönke Küper - Initial contribution
29 public final class AhaCollectionScheduleStub implements AhaCollectionSchedule {
31 public static final Date GENERAL_WASTE_DATE = new GregorianCalendar(2021, 2, 19).getTime();
32 public static final Date LEIGHTWEIGHT_PACKAGING_DATE = new GregorianCalendar(2021, 2, 20).getTime();
33 public static final Date BIO_WASTE_DATE = new GregorianCalendar(2021, 2, 21).getTime();
34 public static final Date PAPER_DATE = new GregorianCalendar(2021, 2, 22).getTime();
37 public Map<WasteType, CollectionDate> getCollectionDates() throws IOException {
38 final Map<WasteType, CollectionDate> result = new LinkedHashMap<>(4);
39 result.put(WasteType.GENERAL_WASTE,
40 new CollectionDate(WasteType.GENERAL_WASTE, Arrays.asList(GENERAL_WASTE_DATE)));
41 result.put(WasteType.LIGHT_PACKAGES,
42 new CollectionDate(WasteType.GENERAL_WASTE, Arrays.asList(LEIGHTWEIGHT_PACKAGING_DATE)));
43 result.put(WasteType.BIO_WASTE, new CollectionDate(WasteType.GENERAL_WASTE, Arrays.asList(BIO_WASTE_DATE)));
44 result.put(WasteType.PAPER, new CollectionDate(WasteType.GENERAL_WASTE, Arrays.asList(PAPER_DATE)));