Added toString.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@885013 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
cab28ac044
commit
9e6576e7cd
|
@ -98,5 +98,20 @@ public class EuclideanIntegerPoint implements Clusterable<EuclideanIntegerPoint>
|
|||
}
|
||||
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();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue