Skip to content

Commit 3e5ae42

Browse files
committed
Merge remote-tracking branch 'origin/develop' into develop
2 parents f51ff59 + 81c2933 commit 3e5ae42

1 file changed

Lines changed: 19 additions & 2 deletions

File tree

  • stub/src/main/java/com/omega_r/libs/omegatypes

stub/src/main/java/com/omega_r/libs/omegatypes/Text.kt

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,33 @@ package com.omega_r.libs.omegatypes
33
import java.io.Serializable
44
import java.lang.RuntimeException
55

6-
interface Text : Serializable, Textable {
6+
open class Text : Serializable, Textable {
7+
8+
companion object {
9+
10+
@JvmStatic
11+
@JvmOverloads
12+
fun from(string: String, textStyle: TextStyle? = null): Text = throw Exception()
13+
14+
}
715

816
interface StringHolder {
917

1018
fun getStringText(): String?
1119

1220
}
1321

22+
operator fun plus(text: Text): Text = throw Exception()
23+
24+
open operator fun plus(string: String): Text = throw Exception()
25+
26+
open operator fun plus(text: Textable): Text = throw Exception()
27+
28+
override fun toText(): Text = throw Exception()
29+
1430
}
1531

1632
abstract class TextStyle : Serializable
1733

18-
fun String.toText(textStyle: TextStyle? = null): Text = throw RuntimeException()
34+
fun String.toText(textStyle: TextStyle? = null): Text = throw RuntimeException()
35+

0 commit comments

Comments
 (0)