sealed class MaybeSubject<out T>
(source)
Represents a BaseAssertionPlant.subject which might be Present or Absent.
It provides a method get where one can get the underlying subject (if Present).
object Absent : MaybeSubject<Nothing>
Represents an absent BaseAssertionPlant.subject. |
|
data class Present<T> : MaybeSubject<T>
Represents a present BaseAssertionPlant.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 Absent : MaybeSubject<Nothing>
Represents an absent BaseAssertionPlant.subject. |
|
data class Present<T> : MaybeSubject<T>
Represents a present BaseAssertionPlant.subject. |