X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Ftext%2FPostPart.java;h=c6ab53484410b7ca9b3de34d2bcbf2aa92bbead5;hp=f7177c9eb5685c4ab74a650d5ed2d4efaefb8b86;hb=fbae4981d8b42f5ad79a82b6c883a45670b175d8;hpb=64abaf4ca1924732a99eeb9f1f461acbeda82a43 diff --git a/src/main/java/net/pterodactylus/sone/text/PostPart.java b/src/main/java/net/pterodactylus/sone/text/PostPart.java index f7177c9..c6ab534 100644 --- a/src/main/java/net/pterodactylus/sone/text/PostPart.java +++ b/src/main/java/net/pterodactylus/sone/text/PostPart.java @@ -26,39 +26,26 @@ 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; } - // - // PART METHODS - // + public boolean usesDeprecatedLink() { + return usesDeprecatedLink; + } - /** - * {@inheritDoc} - */ @Override public String getText() { return post.getText();