Removing clauses (#1195)

* Removing clauses

* Removing clauses from JavaCommercialPaper

* Addressing review comments
This commit is contained in:
mkit
2017-08-09 15:25:31 +01:00
committed by GitHub
parent 28610868c4
commit 0b33214fea
17 changed files with 614 additions and 994 deletions

View File

@ -2,6 +2,7 @@
package net.corda.core.contracts
import net.corda.core.identity.AbstractParty
import net.corda.core.identity.Party
import java.math.BigDecimal
import java.security.PublicKey
@ -71,7 +72,7 @@ inline fun <R> requireThat(body: Requirements.() -> R) = Requirements.body()
/** Filters the command list by type, party and public key all at once. */
inline fun <reified T : CommandData> Collection<AuthenticatedObject<CommandData>>.select(signer: PublicKey? = null,
party: Party? = null) =
party: AbstractParty? = null) =
filter { it.value is T }.
filter { if (signer == null) true else signer in it.signers }.
filter { if (party == null) true else party in it.signingParties }.