From: David ‘Bombe’ Roden Date: Tue, 12 Oct 2010 07:03:47 +0000 (+0200) Subject: Add post stub. X-Git-Tag: 0.1-RC1~545 X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=commitdiff_plain;h=e55884488ff905120dc9747b2dbb61319dca0274 Add post stub. --- 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; + } + +}