get

fun get(): T

If a value is present, returns the value, otherwise throws NoSuchElementException.

Return

the non-null value described by this Optional

Throws

if no value is present