From e55884488ff905120dc9747b2dbb61319dca0274 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Tue, 12 Oct 2010 09:03:47 +0200 Subject: [PATCH] Add post stub. --- .../java/net/pterodactylus/sone/data/Post.java | 65 ++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 src/main/java/net/pterodactylus/sone/data/Post.java diff --git a/src/main/java/net/pterodactylus/sone/data/Post.java b/src/main/java/net/pterodactylus/sone/data/Post.java new file mode 100644 index 0000000..8c7ac51 --- /dev/null +++ b/src/main/java/net/pterodactylus/sone/data/Post.java @@ -0,0 +1,65 @@ +/* + * FreenetSone - StatusUpdate.java - Copyright © 2010 David Roden + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package net.pterodactylus.sone.data; + +/** + * A post is a short message that a user writes in his Sone to let other users + * know what is going on. + * + * @author David ‘Bombe’ Roden + */ +public class Post { + + /** The time of the post (in milliseconds since Jan 1, 1970 UTC). */ + private final long time; + + /** The text of the post. */ + private final String text; + + /** + * Creates a new post. + * + * @param time + * The time of the post (in milliseconds since Jan 1, 1970 UTC) + * @param text + * The text of the post + */ + public Post(long time, String text) { + this.time = time; + this.text = text; + } + + /** + * Returns the time of the post. + * + * @return The time of the post (in milliseconds since Jan 1, 1970 UTC) + */ + public long time() { + return time; + } + + /** + * Returns the text of the post. + * + * @return The text of the post + */ + public String text() { + return text; + } + +} -- 2.7.4