2 * Sone - LinkPart.java - Copyright © 2011–2012 David Roden
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 package net.pterodactylus.sone.text;
21 * {@link Part} implementation that can hold a link. A link contains of three
22 * attributes: the link itself, the text that is shown instead of the link, and
23 * an explanatory text that can be displayed e.g. as a tooltip.
25 * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
27 public class LinkPart implements Part {
29 /** The link of this part. */
30 private final String link;
32 /** The text of this part. */
33 private final String text;
35 /** The title of this part. */
36 private final String title;
39 * Creates a new link part.
42 * The link of the link part
44 * The text of the link part
46 public LinkPart(String link, String text) {
47 this(link, text, text);
51 * Creates a new link part.
54 * The link of the link part
56 * The text of the link part
58 * The title of the link part
60 public LinkPart(String link, String text, String title) {
71 * Returns the link of this part.
73 * @return The link of this part
75 public String getLink() {
80 * Returns the title of this part.
82 * @return The title of this part
84 public String getTitle() {
93 * Returns the text of this part.
95 * @return The text of this part
98 public String getText() {