rio, lca, refactoring
[jalview.git] / forester / java / src / org / forester / util / BasicDescriptiveStatistics.java
index 5e8931c..55aa23b 100644 (file)
@@ -39,11 +39,17 @@ public class BasicDescriptiveStatistics implements DescriptiveStatistics {
     private double       _max;
     private double       _sigma;
     private boolean      _recalc_sigma;
+    private String       _desc;
 
     public BasicDescriptiveStatistics() {
         init();
     }
 
+    public BasicDescriptiveStatistics( final String desc ) {
+        init();
+        setDescription( desc );
+    }
+
     /* (non-Javadoc)
      * @see org.forester.util.DescriptiveStatisticsI#addValue(double)
      */
@@ -167,6 +173,7 @@ public class BasicDescriptiveStatistics implements DescriptiveStatistics {
         _max = -Double.MAX_VALUE;
         _sigma = 0.0;
         _recalc_sigma = true;
+        _desc = "";
     }
 
     /* (non-Javadoc)
@@ -361,4 +368,14 @@ public class BasicDescriptiveStatistics implements DescriptiveStatistics {
     public List<Double> getData() {
         return _data;
     }
+
+    @Override
+    public void setDescription( final String desc ) {
+        _desc = desc;
+    }
+
+    @Override
+    public String getDescription() {
+        return _desc;
+    }
 }