getOrThrow

Returns the encapsulated value if this instance is of type Success, otherwise throws a NoSuchElementException with details from Failure.

Return

the value of type A encapsulated in the Success instance.

Throws

if this instance is of type Failure.