Author: psteitz
Date: Fri Nov 27 21:05:04 2009
New Revision: 885013

URL: http://svn.apache.org/viewvc?rev=885013&view=rev
Log:
Added toString.

Modified:
    
commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/clustering/EuclideanIntegerPoint.java

Modified: 
commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/clustering/EuclideanIntegerPoint.java
URL: 
http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/clustering/EuclideanIntegerPoint.java?rev=885013&r1=885012&r2=885013&view=diff
==============================================================================
--- 
commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/clustering/EuclideanIntegerPoint.java
 (original)
+++ 
commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/clustering/EuclideanIntegerPoint.java
 Fri Nov 27 21:05:04 2009
@@ -98,5 +98,20 @@
         }
         return hashCode;
     }
+    
+    /** {...@inheritdoc} */
+    @Override
+    public String toString() {
+        final StringBuffer buff = new StringBuffer("(");
+        final int[] coordinates = getPoint();
+        for (int i = 0; i < coordinates.length; i++) {
+            buff.append(coordinates[i]);
+            if (i < coordinates.length - 1) {
+                buff.append(",");
+            }
+        }
+        buff.append(")");
+        return buff.toString();
+    }
 
 }


Reply via email to