mirror of
https://github.com/corda/corda.git
synced 2024-12-24 07:06:44 +00:00
Minor: add a kdoc to the select function.
This commit is contained in:
parent
0aa643d4c2
commit
5f30684805
@ -94,6 +94,8 @@ fun Iterable<Amount>.sumOrThrow() = reduce { left, right -> left + right }
|
||||
fun Iterable<Amount>.sumOrZero(currency: Currency) = if (iterator().hasNext()) sumOrThrow() else Amount(0, currency)
|
||||
|
||||
//// Authenticated commands ///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/** Filters the command list by type, institution and public key all at once. */
|
||||
inline fun <reified T : Command> List<AuthenticatedObject<Command>>.select(signer: PublicKey? = null, institution: Institution? = null) =
|
||||
filter { it.value is T }.
|
||||
filter { if (signer == null) true else it.signers.contains(signer) }.
|
||||
|
Loading…
Reference in New Issue
Block a user