]> git.basschouten.com Git - openhab-addons.git/blob
13fd38ca2c6e945298177238ba3bd388e2223936
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2020 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.gardena.internal.model;
14
15 import java.util.ArrayList;
16 import java.util.List;
17
18 import org.apache.commons.lang.builder.ToStringBuilder;
19 import org.apache.commons.lang.builder.ToStringStyle;
20
21 /**
22  * Represents a List of Gardena errors.
23  *
24  * @author Gerhard Riegler - Initial contribution
25  */
26 public class Errors {
27
28     private List<Error> errors = new ArrayList<>();
29
30     /**
31      * Returns a list of Gardena errors.
32      */
33     public List<Error> getErrors() {
34         return errors;
35     }
36
37     @Override
38     public String toString() {
39         ToStringBuilder tsb = new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE);
40         for (Error error : errors) {
41             tsb.append(error);
42         }
43         return tsb.toString();
44     }
45 }