import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
+import java.util.UUID;
import freenet.keys.FreenetURI;
*/
public class Sone {
+ /** A GUID for this Sone. */
+ private final UUID id = UUID.randomUUID();
+
/** The URI under which the Sone is stored in Freenet. */
private final FreenetURI requestUri;
//
/**
+ * Returns the ID of this Sone.
+ *
+ * @return The ID of this Sone
+ */
+ public String getId() {
+ return id.toString();
+ }
+
+ /**
* Returns the request URI of this Sone.
*
* @return The request URI of this Sone
*/
@Override
public int hashCode() {
- /* TODO improve */
- return requestUri.hashCode();
+ return id.hashCode();
}
}