From 4588e37a217d1df4e45ecdaf53be11fe10870576 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Mon, 9 Mar 2009 15:10:49 +0100 Subject: [PATCH] Add container for an edition. --- src/net/pterodactylus/arachne/core/Edition.java | 54 +++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 src/net/pterodactylus/arachne/core/Edition.java 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; + } + +} -- 2.7.4