Loney Chou
10/22/2022, 2:36 PMephemient
10/22/2022, 2:37 PMephemient
10/22/2022, 2:38 PMLoney Chou
10/22/2022, 2:39 PMMatt Nelson
10/24/2022, 5:49 AMsealed interface
and use an invoke operator to instantiate it. So from Java it'll be MySealedValueClass.invoke("some value")
, and from Kotlin it'll just be MySealedValueClass("some value")
https://kotlinlang.slack.com/archives/C3PQML5NU/p1651526497807819?thread_ts=1651318218.682619&cid=C3PQML5NUephemient
10/24/2022, 8:08 AMvalue class
though; by using the interface it will always be boxedMatt Nelson
01/11/2023, 2:00 PMvalue class
not compiling to platform code.
https://github.com/05nelsonm/component-value-clazzephemient
01/11/2023, 6:29 PMvalue
at all though?Matt Nelson
01/11/2023, 7:28 PMhashCode
, equals
and toString
which your implementation would extend. Functionally, it does the same thing as a Kotlin value class
if that value class
were to implement an interface