From 985f25a5434ba6ba57cbafc347cbc49e67359d3f Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Wed, 13 Oct 2010 11:12:11 +0200 Subject: [PATCH] Add name to the Sone. --- .../java/net/pterodactylus/sone/data/Sone.java | 23 +++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/src/main/java/net/pterodactylus/sone/data/Sone.java b/src/main/java/net/pterodactylus/sone/data/Sone.java index b969bd4..ba5ef68 100644 --- a/src/main/java/net/pterodactylus/sone/data/Sone.java +++ b/src/main/java/net/pterodactylus/sone/data/Sone.java @@ -35,6 +35,9 @@ public class Sone { /** A GUID for this Sone. */ private final UUID id = UUID.randomUUID(); + /** The name of this Sone. */ + private final String name; + /** The URI under which the Sone is stored in Freenet. */ private final FreenetURI requestUri; @@ -48,22 +51,27 @@ public class Sone { /** * Creates a new Sone. * + * @param name + * The name of the Sone * @param requestUri * The request URI of the Sone */ - public Sone(FreenetURI requestUri) { - this(requestUri, null); + public Sone(String name, FreenetURI requestUri) { + this(name, requestUri, null); } /** * Creates a new Sone. * + * @param name + * The name of the Sone * @param requestUri * The request URI of the Sone * @param insertUri * The insert URI of the Sone */ - public Sone(FreenetURI requestUri, FreenetURI insertUri) { + public Sone(String name, FreenetURI requestUri, FreenetURI insertUri) { + this.name = name; this.requestUri = requestUri; this.insertUri = insertUri; } @@ -82,6 +90,15 @@ public class Sone { } /** + * Returns the name of this Sone. + * + * @return The name of this Sone + */ + public String getName() { + return name; + } + + /** * Returns the request URI of this Sone. * * @return The request URI of this Sone -- 2.7.4