X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Ftext%2FLinkPart.java;h=d5da73062955181f873a701d0c6bfa60ea8bd2e8;hp=d911bbd5f0d17fbbf6d6e0e498e9268e778ca451;hb=a170ca4a7b77749951028f691ab126cd507a96fa;hpb=a448427ff29e5b39b42a6bdf50da551bf6665e32 diff --git a/src/main/java/net/pterodactylus/sone/text/LinkPart.java b/src/main/java/net/pterodactylus/sone/text/LinkPart.java index d911bbd..d5da730 100644 --- a/src/main/java/net/pterodactylus/sone/text/LinkPart.java +++ b/src/main/java/net/pterodactylus/sone/text/LinkPart.java @@ -18,20 +18,45 @@ package net.pterodactylus.sone.text; /** - * TODO + * {@link Part} implementation that can hold a link. A link contains of three + * attributes: the link itself, the text that is shown instead of the link, and + * an explanatory text that can be displayed e.g. as a tooltip. * * @author David ‘Bombe’ Roden */ public class LinkPart implements Part { + /** The link of this part. */ private final String link; + + /** The text of this part. */ private final String text; + + /** The title of this part. */ private final String title; + /** + * Creates a new link part. + * + * @param link + * The link of the link part + * @param text + * The text of the link part + */ public LinkPart(String link, String text) { this(link, text, text); } + /** + * Creates a new link part. + * + * @param link + * The link of the link part + * @param text + * The text of the link part + * @param title + * The title of the link part + */ public LinkPart(String link, String text, String title) { this.link = link; this.text = text; @@ -42,14 +67,29 @@ public class LinkPart implements Part { // ACCESSORS // + /** + * Returns the link of this part. + * + * @return The link of this part + */ public String getLink() { return link; } + /** + * Returns the text of this part. + * + * @return The text of this part + */ public String getText() { return text; } + /** + * Returns the title of this part. + * + * @return The title of this part + */ public String getTitle() { return title; }