Author: nextgens
Date: 2008-04-04 05:20:31 +0000 (Fri, 04 Apr 2008)
New Revision: 18966
Modified:
trunk/freenet/src/freenet/crypt/SHA1.java
trunk/freenet/src/freenet/support/DoublyLinkedListImpl.java
trunk/freenet/src/freenet/support/math/DecayingKeyspaceAverage.java
trunk/freenet/src/freenet/support/math/RunningAverage.java
trunk/freenet/src/freenet/support/math/SimpleBinaryRunningAverage.java
Log:
implement Cloneable where we have a clone() method
Modified: trunk/freenet/src/freenet/crypt/SHA1.java
===================================================================
--- trunk/freenet/src/freenet/crypt/SHA1.java 2008-04-03 18:31:56 UTC (rev
18965)
+++ trunk/freenet/src/freenet/crypt/SHA1.java 2008-04-04 05:20:31 UTC (rev
18966)
@@ -33,7 +33,7 @@
* This is a simple port of Steve Reid's SHA-1 code into Java.
* I've run his test vectors through the code and they all pass.
*/
-public final class SHA1 implements Digest {
+public final class SHA1 implements Digest, Cloneable {
private static boolean alwaysThisOne = false;
Modified: trunk/freenet/src/freenet/support/DoublyLinkedListImpl.java
===================================================================
--- trunk/freenet/src/freenet/support/DoublyLinkedListImpl.java 2008-04-03
18:31:56 UTC (rev 18965)
+++ trunk/freenet/src/freenet/support/DoublyLinkedListImpl.java 2008-04-04
05:20:31 UTC (rev 18966)
@@ -10,7 +10,7 @@
* TODO: there are still some unimplemented methods
* -- it remains to be seen if they are needed at all
*/
-public class DoublyLinkedListImpl implements DoublyLinkedList {
+public class DoublyLinkedListImpl implements DoublyLinkedList, Cloneable {
protected int size;
protected Item _headptr, _tailptr;
Modified: trunk/freenet/src/freenet/support/math/DecayingKeyspaceAverage.java
===================================================================
--- trunk/freenet/src/freenet/support/math/DecayingKeyspaceAverage.java
2008-04-03 18:31:56 UTC (rev 18965)
+++ trunk/freenet/src/freenet/support/math/DecayingKeyspaceAverage.java
2008-04-04 05:20:31 UTC (rev 18966)
@@ -12,7 +12,7 @@
*
* A filter on BootstrappingDecayingRunningAverage which makes it aware of the
circular keyspace.
*/
-public class DecayingKeyspaceAverage implements RunningAverage {
+public class DecayingKeyspaceAverage implements RunningAverage, Cloneable {
private static final long serialVersionUID = 5129429614949179428L;
/**
'avg' is the normalized average location, note that the the reporting
bounds are (-2.0, 2.0) however.
Modified: trunk/freenet/src/freenet/support/math/RunningAverage.java
===================================================================
--- trunk/freenet/src/freenet/support/math/RunningAverage.java 2008-04-03
18:31:56 UTC (rev 18965)
+++ trunk/freenet/src/freenet/support/math/RunningAverage.java 2008-04-04
05:20:31 UTC (rev 18966)
@@ -5,7 +5,7 @@
import java.io.Serializable;
-public interface RunningAverage extends Serializable {
+public interface RunningAverage extends Serializable, Cloneable {
public Object clone();
Modified: trunk/freenet/src/freenet/support/math/SimpleBinaryRunningAverage.java
===================================================================
--- trunk/freenet/src/freenet/support/math/SimpleBinaryRunningAverage.java
2008-04-03 18:31:56 UTC (rev 18965)
+++ trunk/freenet/src/freenet/support/math/SimpleBinaryRunningAverage.java
2008-04-04 05:20:31 UTC (rev 18966)
@@ -15,7 +15,7 @@
* @author amphibian
* Created on May 14, 2004
*/
-public class SimpleBinaryRunningAverage implements RunningAverage {
+public class SimpleBinaryRunningAverage implements RunningAverage, Cloneable {
private static final long serialVersionUID = -1;
public Object clone() {