Some

data class Some<T> : Optional<T>

Fields

Name Description
val isPresent: Boolean
val value: T

Constructors

<init>

constructor(value: T)

Parameters

Name Description
value: T

Methods

map

fun <R> map(function: (T)->R): Some<R>

Parameters

Name Description
function: (T)->R

ReturnValue

Name Description
Some<R>

filter

fun filter(predicate: (T)->Boolean): Optional<T>

Parameters

Name Description
predicate: (T)->Boolean

ReturnValue

Name Description
Optional<T>

toSequence

fun toSequence(): Sequence<T>

ReturnValue

Name Description
Sequence<T>

toString

fun toString(): String

ReturnValue

Name Description
String