corda / net.corda.core / kotlin.collections.Iterable / noneOrSingle

# noneOrSingle

`fun <T> Iterable<T>.noneOrSingle(predicate: (T) -> Boolean): T?`

Returns the single element matching the given predicate, or `null` if element was not found, or throws if more than one element was found.

`fun <T> Iterable<T>.noneOrSingle(): T?`

Returns single element, or `null` if element was not found, or throws if more than one element was found.