Can I add an existing java class to a sealed Kotlin class?
I am using 2 classes to handle error statuses, the Spring's own org.springframework.http.HttpStatus and my custom ErrorStatus:
enum class ErrorStatus(val code: Int, val reasonPhrase: String) {
ELEMENT_NOT_FOUND(1404, "Element not found"),
UNKNOWN_ERROR(1000, "Unknown Error"),
}
I would like to seal both classes using:
sealed interface Error
It's simple to do this with my class: enum class ErrorStatus(val code: Int, val reasonPhrase: String) : Error {
But is it possible to mark...