From: David ‘Bombe’ Roden Date: Wed, 13 Oct 2010 09:12:11 +0000 (+0200) Subject: Add name to the Sone. X-Git-Tag: 0.1-RC1~504 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=985f25a5434ba6ba57cbafc347cbc49e67359d3f;p=Sone.git Add name to the Sone. --- 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