]> git.basschouten.com Git - openhab-addons.git/blob
727b8985f44ea7fe5cdc3f5651d66615407c6700
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2023 Contributors to the openHAB project
3  *
4  * See the NOTICE file(s) distributed with this work for additional
5  * information.
6  *
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
10  *
11  * SPDX-License-Identifier: EPL-2.0
12  */
13 package org.openhab.binding.ahawastecollection.internal;
14
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;
20 import java.util.Map;
21
22 import org.eclipse.jdt.annotation.NonNullByDefault;
23 import org.openhab.binding.ahawastecollection.internal.CollectionDate.WasteType;
24
25 /**
26  * @author Sönke Küper - Initial contribution
27  */
28 @NonNullByDefault
29 public final class AhaCollectionScheduleStub implements AhaCollectionSchedule {
30
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();
35
36     @Override
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)));
45         return result;
46     }
47 }