View Javadoc
1   /*
2    * Licensed under the GPL License. You may not use this file except in compliance with the License.
3    * You may obtain a copy of the License at
4    *
5    *   https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
6    *
7    * THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
8    * WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
9    * PURPOSE.
10   */
11  package psiprobe.model.jsp;
12  
13  import java.io.Serializable;
14  import java.util.Collections;
15  import java.util.HashMap;
16  import java.util.Map;
17  
18  /**
19   * The Class Summary.
20   */
21  public class Summary implements Serializable {
22  
23    /** The Constant serialVersionUID. */
24    private static final long serialVersionUID = 1L;
25  
26    /** The name. */
27    private String name;
28  
29    /** The items. */
30    private Map<String, Item> items;
31  
32    /** The out of date count. */
33    private int outOfDateCount;
34  
35    /**
36     * Gets the name.
37     *
38     * @return the name
39     */
40    public String getName() {
41      return name;
42    }
43  
44    /**
45     * Sets the name.
46     *
47     * @param name the new name
48     */
49    public void setName(String name) {
50      this.name = name;
51    }
52  
53    /**
54     * Gets the items.
55     *
56     * @return the items
57     */
58    public Map<String, Item> getItems() {
59      return items == null ? Collections.emptyMap() : new HashMap<>(items);
60    }
61  
62    /**
63     * Sets the items.
64     *
65     * @param items the items
66     */
67    public void setItems(Map<String, Item> items) {
68      this.items = items == null ? Collections.emptyMap() : new HashMap<>(items);
69    }
70  
71    /**
72     * Put the items.
73     *
74     * @param string the string
75     * @param item the item
76     */
77    public void putItem(String string, Item item) {
78      if (items == null) {
79        items = new HashMap<>();
80      }
81      items.put(string, item);
82    }
83  
84    /**
85     * Gets the out of date count.
86     *
87     * @return the out of date count
88     */
89    public int getOutOfDateCount() {
90      return outOfDateCount;
91    }
92  
93    /**
94     * Sets the out of date count.
95     *
96     * @param outOfDateCount the new out of date count
97     */
98    public void setOutOfDateCount(int outOfDateCount) {
99      this.outOfDateCount = outOfDateCount;
100   }
101 
102 }