X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fdata%2FSone.java;h=2efb90d9185be90a53c2ebeb674f3e01a6de46d7;hp=9219e990ac76390a088ca299b35d9de3c234f05c;hb=7105c9338f9c7ec88da8044645482ecc09458cd0;hpb=e2cae8504eea6b4c833e9aa87ccd70d897e5f0f2 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.