Implement clone().

git-svn-id: https://samskivert.googlecode.com/svn/trunk@2485 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
samskivert
2008-11-18 21:58:02 +00:00
parent 74c1a9c776
commit 52dc3731c3
+13 -1
View File
@@ -101,7 +101,19 @@ public class Histogram
return buf.toString();
}
@Override
@Override // from Object
public Histogram clone ()
{
try {
Histogram chisto = (Histogram)super.clone();
chisto._buckets = _buckets.clone();
return chisto;
} catch (CloneNotSupportedException cnse) {
throw new AssertionError();
}
}
@Override // from Object
public String toString ()
{
return "[min=" + _minValue + ", max=" + _maxValue +