From 7105c9338f9c7ec88da8044645482ecc09458cd0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Sun, 17 Oct 2010 18:26:13 +0200 Subject: [PATCH] Store the time of the last update in the Sone. --- .../java/net/pterodactylus/sone/data/Sone.java | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/main/java/net/pterodactylus/sone/data/Sone.java b/src/main/java/net/pterodactylus/sone/data/Sone.java index 9219e99..2efb90d 100644 --- a/src/main/java/net/pterodactylus/sone/data/Sone.java +++ b/src/main/java/net/pterodactylus/sone/data/Sone.java @@ -57,6 +57,9 @@ public class Sone { /* This will be null for remote Sones! */ private FreenetURI insertUri; + /** The time of the last inserted update. */ + private long time; + /** The profile of this Sone. */ private Profile profile; @@ -159,6 +162,27 @@ public class Sone { } /** + * Return the time of the last inserted update of this Sone. + * + * @return The time of the update (in milliseconds since Jan 1, 1970 UTC) + */ + public long getTime() { + return time; + } + + /** + * Sets the time of the last inserted update of this Sone. + * + * @param time + * The time of the update (in milliseconds since Jan 1, 1970 UTC) + * @return This Sone (for method chaining) + */ + public Sone setTime(long time) { + this.time = time; + return this; + } + + /** * Returns a copy of the profile. If you want to update values in the * profile of this Sone, update the values in the returned {@link Profile} * and use {@link #setProfile(Profile)} to change the profile in this Sone. -- 2.7.4