comparison gnv-artifacts/src/main/java/de/intevation/gnv/statistics/Statistic.java @ 814:9d427dd2a96a

Added Javadoc in statistic package. gnv-artifacts/trunk@898 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Fri, 09 Apr 2010 14:34:45 +0000
parents 7fb9441dd8af
children 05bf8534a35a
comparison
equal deleted inserted replaced
813:79c1db3ca7cc 814:9d427dd2a96a
16 package de.intevation.gnv.statistics; 16 package de.intevation.gnv.statistics;
17 17
18 import org.apache.log4j.Logger; 18 import org.apache.log4j.Logger;
19 19
20 /** 20 /**
21 * The class <code>Statistic</code> fulfills the following purposes: 21 * This class stores a double value with a specific key.
22 * <ol>
23 * <li></li>
24 * </ol>
25 * 22 *
26 * @author blume 23 * @author blume
27 * @version 1.0
28 * @serial 1.0
29 * @see
30 * @since 14.12.2007 09:38:18
31 */ 24 */
32 public class Statistic { 25 public class Statistic {
33 26
34 /** 27 /**
35 * Default Logging instance 28 * Default Logging instance
38 private static boolean sDebug = sLogger.isDebugEnabled(); 31 private static boolean sDebug = sLogger.isDebugEnabled();
39 32
40 private double mValue; 33 private double mValue;
41 private String mKey; 34 private String mKey;
42 35
36 /**
37 * Creates a new Statistic with a given key and a value.
38 * @param pKey The key.
39 * @param pValue The value.
40 */
43 public Statistic(String pKey, double pValue) { 41 public Statistic(String pKey, double pValue) {
44 mKey = pKey; 42 mKey = pKey;
45 mValue = pValue; 43 mValue = pValue;
46 } 44 }
47 45
46 /**
47 * Returns the value.
48 * @return the value.
49 */
48 public double getValue() { 50 public double getValue() {
49 return mValue; 51 return mValue;
50 } 52 }
51 53
54 /**
55 * Returns the key.
56 * @return the key.
57 */
52 public String getKey() { 58 public String getKey() {
53 return mKey; 59 return mKey;
54 } 60 }
55 61
62 /**
63 * Turns the value into string representation and returns it.<br>
64 * <b>Attention:</b> This method doesn't take a locale into account.
65 *
66 * @return the value as string.
67 */
56 public String getStringValue() { 68 public String getStringValue() {
57 java.text.DecimalFormat df = new java.text.DecimalFormat("#.##"); 69 java.text.DecimalFormat df = new java.text.DecimalFormat("#.##");
58 return df.format(mValue); 70 return df.format(mValue);
59 } 71 }
60
61 } 72 }
73 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org