sealed class MaybeSubject<out T>
Represents a subject of an assertion which might be Present or Absent.
It provides a method get where one can get the underlying subject (if Present).
object
Represents an absent subject. |
|
data class
Represents a present subject. |
abstract fun get(): T
Returns the underlying subject or throws a PlantHasNoSubjectException if it is Absent. |
operator fun <T : Any> invoke(subject: T?): MaybeSubject<T> |
object
Represents an absent subject. |
|
data class
Represents a present subject. |