Replace most parts with Kotlin equivalents
[Sone.git] / src / main / kotlin / net / pterodactylus / sone / text / LinkPart.kt
diff --git a/src/main/kotlin/net/pterodactylus/sone/text/LinkPart.kt b/src/main/kotlin/net/pterodactylus/sone/text/LinkPart.kt
new file mode 100644 (file)
index 0000000..7099b93
--- /dev/null
@@ -0,0 +1,12 @@
+package net.pterodactylus.sone.text
+
+/**
+ * {@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.
+ */
+data class LinkPart(val link: String, override val text: String, val title: String) : Part {
+
+       constructor(link: String, text: String) : this(link, text, link)
+
+}