From: David ‘Bombe’ Roden Date: Mon, 9 Mar 2009 13:38:33 +0000 (+0100) Subject: Add site container. X-Git-Url: https://git.pterodactylus.net/?p=arachne.git;a=commitdiff_plain;h=11e6cfaff38dbcb107662534c288f17689bf90e2 Add site container. --- diff --git a/src/net/pterodactylus/arachne/core/Site.java b/src/net/pterodactylus/arachne/core/Site.java new file mode 100644 index 0000000..bcefb45 --- /dev/null +++ b/src/net/pterodactylus/arachne/core/Site.java @@ -0,0 +1,51 @@ +/* + * © 2009 David ‘Bombe’ Roden + */ +package net.pterodactylus.arachne.core; + +/** + * Container for a freenet site. A freenet site consists of the routing and + * decryption keys and the basename, without the edition. + * + * @author David ‘Bombe’ Roden + */ +public class Site { + + /** The key of the site. */ + private final String key; + + /** The basename of the site. */ + private final String basename; + + /** + * Creates a new site with the given key and basename. + * + * @param key + * The key of the site + * @param basename + * The basename of the site + */ + public Site(String key, String basename) { + this.key = key; + this.basename = basename; + } + + /** + * The routing and decryption keys of the site. + * + * @return The site’s routing and decryption keys + */ + public String getKey() { + return key; + } + + /** + * Returns the basename of the site, without the edition number. + * + * @return The site’s basename + */ + public String getBasename() { + return basename; + } + +}