X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Ftext%2FPostPart.java;h=f7177c9eb5685c4ab74a650d5ed2d4efaefb8b86;hb=aadf0893d8d3c791d9bb01db8009bb12f06e49c7;hp=1e0773d65b21f295a03b17df82762415c889db95;hpb=ab7fada54ed08b0a8d9ce9c606cbea29c3c3f819;p=Sone.git diff --git a/src/main/java/net/pterodactylus/sone/text/PostPart.java b/src/main/java/net/pterodactylus/sone/text/PostPart.java index 1e0773d..f7177c9 100644 --- a/src/main/java/net/pterodactylus/sone/text/PostPart.java +++ b/src/main/java/net/pterodactylus/sone/text/PostPart.java @@ -1,5 +1,5 @@ /* - * Sone - PostLinkPart.java - Copyright © 2011 David Roden + * Sone - PostPart.java - Copyright © 2011–2013 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 @@ -20,20 +20,48 @@ package net.pterodactylus.sone.text; import net.pterodactylus.sone.data.Post; /** - * TODO + * {@link Part} implementation that stores a reference to a {@link Post}. * * @author David ‘Bombe’ Roden */ public class PostPart implements Part { + /** The post this part refers to. */ private final Post post; + /** + * Creates a new post part. + * + * @param post + * The referenced post + */ public PostPart(Post post) { this.post = post; } + // + // ACCESSORS + // + + /** + * Returns the post referenced by this part. + * + * @return The post referenced by this part + */ public Post getPost() { return post; } + // + // PART METHODS + // + + /** + * {@inheritDoc} + */ + @Override + public String getText() { + return post.getText(); + } + }