X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;ds=sidebyside;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Ftext%2FPostPart.java;h=c6ab53484410b7ca9b3de34d2bcbf2aa92bbead5;hb=cc18e5878bc71081da5137eb777d91821c3f4cce;hp=c416c571380114b6696e2cdca8ae855202a9c2c2;hpb=a47643aed43d118ca68044f95451bb5374cdb332;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 c416c57..c6ab534 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–2012 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 @@ -26,30 +26,29 @@ import net.pterodactylus.sone.data.Post; */ public class PostPart implements Part { - /** The post this part refers to. */ private final Post post; + private final boolean usesDeprecatedLink; - /** - * Creates a new post part. - * - * @param post - * The referenced post - */ public PostPart(Post post) { - this.post = post; + this(post, false); } - // - // ACCESSORS - // + public PostPart(Post post, boolean usesDeprecatedLink) { + this.post = post; + this.usesDeprecatedLink = usesDeprecatedLink; + } - /** - * Returns the post referenced by this part. - * - * @return The post referenced by this part - */ public Post getPost() { return post; } + public boolean usesDeprecatedLink() { + return usesDeprecatedLink; + } + + @Override + public String getText() { + return post.getText(); + } + }