From: David ‘Bombe’ Roden Date: Mon, 9 Mar 2009 14:10:49 +0000 (+0100) Subject: Add container for an edition. X-Git-Url: https://git.pterodactylus.net/?p=arachne.git;a=commitdiff_plain;h=4588e37a217d1df4e45ecdaf53be11fe10870576 Add container for an edition. --- diff --git a/src/net/pterodactylus/arachne/core/Edition.java b/src/net/pterodactylus/arachne/core/Edition.java new file mode 100644 index 0000000..5fbc41f --- /dev/null +++ b/src/net/pterodactylus/arachne/core/Edition.java @@ -0,0 +1,54 @@ +/* + * © 2009 David ‘Bombe’ Roden + */ +package net.pterodactylus.arachne.core; + +import de.ina.util.validation.Validation; + +/** + * Container for an edition. An edition is (contrary to the usual “freenet + * jargon”) a specific edition of a site. + * + * @author David ‘Bombe’ Roden + */ +public class Edition { + + /** The site of the edition. */ + private final Site site; + + /** The edition number of the edition. */ + private final int edition; + + /** + * Creates a new edition. + * + * @param site + * The site of the edition + * @param edition + * The edition number of the edition + */ + public Edition(Site site, int edition) { + Validation.begin().isNotNull("site", site).isPositive("edition", edition).check(); + this.site = site; + this.edition = edition; + } + + /** + * Returns the site of this edition. + * + * @return This edition’s site + */ + public Site getSite() { + return site; + } + + /** + * Returns the edition number of this edition. + * + * @return This edition’s edition number + */ + public int getEdition() { + return edition; + } + +}