Mercurial > dive4elements > gnv-client
annotate gnv-artifacts/src/main/java/de/intevation/gnv/statistics/StatisticSet.java @ 1129:ccfa07b88476
merged geo-backend
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Fri, 28 Sep 2012 12:14:01 +0200 |
parents | f953c9a559d8 |
children |
rev | line source |
---|---|
1115
f953c9a559d8
Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
836
diff
changeset
|
1 /* |
f953c9a559d8
Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
836
diff
changeset
|
2 * Copyright (c) 2010 by Intevation GmbH |
f953c9a559d8
Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
836
diff
changeset
|
3 * |
f953c9a559d8
Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
836
diff
changeset
|
4 * This program is free software under the LGPL (>=v2.1) |
f953c9a559d8
Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
836
diff
changeset
|
5 * Read the file LGPL.txt coming with the software for details |
f953c9a559d8
Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
836
diff
changeset
|
6 * or visit http://www.gnu.org/licenses/ if it does not exist. |
f953c9a559d8
Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
836
diff
changeset
|
7 */ |
f953c9a559d8
Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
836
diff
changeset
|
8 |
253
07650fc6014c
Put a name to each Statistic group which is similar to the name of the
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
9 package de.intevation.gnv.statistics; |
07650fc6014c
Put a name to each Statistic group which is similar to the name of the
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
10 |
07650fc6014c
Put a name to each Statistic group which is similar to the name of the
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
11 import java.util.ArrayList; |
07650fc6014c
Put a name to each Statistic group which is similar to the name of the
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
12 import java.util.Collection; |
07650fc6014c
Put a name to each Statistic group which is similar to the name of the
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
13 |
07650fc6014c
Put a name to each Statistic group which is similar to the name of the
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
14 /** |
814
9d427dd2a96a
Added Javadoc in statistic package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
15 * A container to store several statistics. |
9d427dd2a96a
Added Javadoc in statistic package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
16 * |
780
c4156275c1e1
Bring @author javadoc tags in form '@author <a href="john.doe@example.com">John Doe</a>'
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
779
diff
changeset
|
17 * @author <a href="mailto:tim.englich@intevation.de">Tim Englich</a> |
253
07650fc6014c
Put a name to each Statistic group which is similar to the name of the
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
18 */ |
07650fc6014c
Put a name to each Statistic group which is similar to the name of the
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
19 public class StatisticSet { |
07650fc6014c
Put a name to each Statistic group which is similar to the name of the
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
20 |
778
9a828e5a2390
Removed trailing whitespace
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
253
diff
changeset
|
21 |
253
07650fc6014c
Put a name to each Statistic group which is similar to the name of the
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
22 private String name = null; |
778
9a828e5a2390
Removed trailing whitespace
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
253
diff
changeset
|
23 |
253
07650fc6014c
Put a name to each Statistic group which is similar to the name of the
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
24 private Collection<Statistic> statistics = new ArrayList<Statistic>(); |
778
9a828e5a2390
Removed trailing whitespace
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
253
diff
changeset
|
25 |
253
07650fc6014c
Put a name to each Statistic group which is similar to the name of the
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
26 /** |
07650fc6014c
Put a name to each Statistic group which is similar to the name of the
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
27 * Constructor |
814
9d427dd2a96a
Added Javadoc in statistic package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
28 * @param name Name of this container. |
253
07650fc6014c
Put a name to each Statistic group which is similar to the name of the
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
29 */ |
07650fc6014c
Put a name to each Statistic group which is similar to the name of the
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
30 public StatisticSet(String name) { |
07650fc6014c
Put a name to each Statistic group which is similar to the name of the
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
31 this.name = name; |
07650fc6014c
Put a name to each Statistic group which is similar to the name of the
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
32 } |
778
9a828e5a2390
Removed trailing whitespace
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
253
diff
changeset
|
33 |
9a828e5a2390
Removed trailing whitespace
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
253
diff
changeset
|
34 |
814
9d427dd2a96a
Added Javadoc in statistic package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
35 /** |
9d427dd2a96a
Added Javadoc in statistic package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
36 * Add a further statistic to this container. |
9d427dd2a96a
Added Javadoc in statistic package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
37 * |
9d427dd2a96a
Added Javadoc in statistic package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
38 * @param statistic A statistic. |
9d427dd2a96a
Added Javadoc in statistic package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
39 */ |
253
07650fc6014c
Put a name to each Statistic group which is similar to the name of the
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
40 public void addStatistic(Statistic statistic){ |
07650fc6014c
Put a name to each Statistic group which is similar to the name of the
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
41 this.statistics.add(statistic); |
07650fc6014c
Put a name to each Statistic group which is similar to the name of the
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
42 } |
778
9a828e5a2390
Removed trailing whitespace
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
253
diff
changeset
|
43 |
814
9d427dd2a96a
Added Javadoc in statistic package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
44 /** |
9d427dd2a96a
Added Javadoc in statistic package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
45 * Returns all statistics in this container. |
9d427dd2a96a
Added Javadoc in statistic package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
46 * @return all statistics. |
9d427dd2a96a
Added Javadoc in statistic package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
47 */ |
253
07650fc6014c
Put a name to each Statistic group which is similar to the name of the
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
48 public Collection<Statistic> getStatistics(){ |
07650fc6014c
Put a name to each Statistic group which is similar to the name of the
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
49 return this.statistics; |
07650fc6014c
Put a name to each Statistic group which is similar to the name of the
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
50 } |
778
9a828e5a2390
Removed trailing whitespace
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
253
diff
changeset
|
51 |
814
9d427dd2a96a
Added Javadoc in statistic package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
52 /** |
9d427dd2a96a
Added Javadoc in statistic package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
53 * Returns the name of this container. |
9d427dd2a96a
Added Javadoc in statistic package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
54 * @return the name. |
9d427dd2a96a
Added Javadoc in statistic package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
55 */ |
253
07650fc6014c
Put a name to each Statistic group which is similar to the name of the
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
56 public String getName(){ |
07650fc6014c
Put a name to each Statistic group which is similar to the name of the
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
57 return this.name; |
07650fc6014c
Put a name to each Statistic group which is similar to the name of the
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
58 } |
07650fc6014c
Put a name to each Statistic group which is similar to the name of the
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
59 } |
836
05bf8534a35a
Using unix line endings only.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
814
diff
changeset
|
60 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |