comparison gnv-artifacts/src/main/java/de/intevation/gnv/statistics/StatisticSet.java @ 1119:7c4f81f74c47

merged gnv-artifacts
author Thomas Arendsen Hein <thomas@intevation.de>
date Fri, 28 Sep 2012 12:14:00 +0200
parents f953c9a559d8
children
comparison
equal deleted inserted replaced
1027:fca4b5eb8d2f 1119:7c4f81f74c47
1 /*
2 * Copyright (c) 2010 by Intevation GmbH
3 *
4 * This program is free software under the LGPL (>=v2.1)
5 * Read the file LGPL.txt coming with the software for details
6 * or visit http://www.gnu.org/licenses/ if it does not exist.
7 */
8
9 package de.intevation.gnv.statistics;
10
11 import java.util.ArrayList;
12 import java.util.Collection;
13
14 /**
15 * A container to store several statistics.
16 *
17 * @author <a href="mailto:tim.englich@intevation.de">Tim Englich</a>
18 */
19 public class StatisticSet {
20
21
22 private String name = null;
23
24 private Collection<Statistic> statistics = new ArrayList<Statistic>();
25
26 /**
27 * Constructor
28 * @param name Name of this container.
29 */
30 public StatisticSet(String name) {
31 this.name = name;
32 }
33
34
35 /**
36 * Add a further statistic to this container.
37 *
38 * @param statistic A statistic.
39 */
40 public void addStatistic(Statistic statistic){
41 this.statistics.add(statistic);
42 }
43
44 /**
45 * Returns all statistics in this container.
46 * @return all statistics.
47 */
48 public Collection<Statistic> getStatistics(){
49 return this.statistics;
50 }
51
52 /**
53 * Returns the name of this container.
54 * @return the name.
55 */
56 public String getName(){
57 return this.name;
58 }
59 }
60 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org