commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From l..@apache.org
Subject svn commit: r981256 - /commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/descriptive/MultivariateSummaryStatistics.java
Date Sun, 01 Aug 2010 16:14:12 GMT
Author: luc
Date: Sun Aug  1 16:14:11 2010
New Revision: 981256

URL: http://svn.apache.org/viewvc?rev=981256&view=rev
Log:
removed duplicate strings

Modified:
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/descriptive/MultivariateSummaryStatistics.java

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/descriptive/MultivariateSummaryStatistics.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/descriptive/MultivariateSummaryStatistics.java?rev=981256&r1=981255&r2=981256&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/descriptive/MultivariateSummaryStatistics.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/descriptive/MultivariateSummaryStatistics.java
Sun Aug  1 16:14:11 2010
@@ -304,17 +304,19 @@ public class MultivariateSummaryStatisti
      */
     @Override
     public String toString() {
+        final String separator = ", ";
+        final String suffix = System.getProperty("line.separator");
         StringBuffer outBuffer = new StringBuffer();
-        outBuffer.append("MultivariateSummaryStatistics:\n");
-        outBuffer.append("n: " + getN() + "\n");
-        append(outBuffer, getMin(), "min: ", ", ", "\n");
-        append(outBuffer, getMax(), "max: ", ", ", "\n");
-        append(outBuffer, getMean(), "mean: ", ", ", "\n");
-        append(outBuffer, getGeometricMean(), "geometric mean: ", ", ", "\n");
-        append(outBuffer, getSumSq(), "sum of squares: ", ", ", "\n");
-        append(outBuffer, getSumLog(), "sum of logarithms: ", ", ", "\n");
-        append(outBuffer, getStandardDeviation(), "standard deviation: ", ", ", "\n");
-        outBuffer.append("covariance: " + getCovariance().toString() + "\n");
+        outBuffer.append("MultivariateSummaryStatistics:" + suffix);
+        outBuffer.append("n: " + getN() + suffix);
+        append(outBuffer, getMin(), "min: ", separator, suffix);
+        append(outBuffer, getMax(), "max: ", separator, suffix);
+        append(outBuffer, getMean(), "mean: ", separator, suffix);
+        append(outBuffer, getGeometricMean(), "geometric mean: ", separator, suffix);
+        append(outBuffer, getSumSq(), "sum of squares: ", separator, suffix);
+        append(outBuffer, getSumLog(), "sum of logarithms: ", separator, suffix);
+        append(outBuffer, getStandardDeviation(), "standard deviation: ", separator, suffix);
+        outBuffer.append("covariance: " + getCovariance().toString() + suffix);
         return outBuffer.toString();
     }
 



Mime
View raw message