public class AnyOf<S extends ContractState,C extends CommandData,K>
extends CompositeClause
Compose a number of clauses, such that one or more of the clauses can run.
Clause.Companion
Constructor and Description |
---|
AnyOf(net.corda.core.contracts.clauses.Clause rawClauses)
Compose a number of clauses, such that one or more of the clauses can run.
|
Modifier and Type | Method and Description |
---|---|
java.util.List<net.corda.core.contracts.clauses.Clause> |
getClauses()
List of clauses under this composite clause
|
java.util.List<net.corda.core.contracts.clauses.Clause> |
matchedClauses(java.util.List<? extends net.corda.core.contracts.AuthenticatedObject<? extends C>> commands)
Determine which clauses are matched by the supplied commands.
|
java.lang.String |
toString() |
java.util.Set<C> |
verify(TransactionForContract tx,
java.util.List<? extends S> inputs,
java.util.List<? extends S> outputs,
java.util.List<? extends net.corda.core.contracts.AuthenticatedObject<? extends C>> commands,
K groupingKey)
Verify the transaction matches the conditions from this clause. For example, a "no zero amount output" clause
would check each of the output states that it applies to, looking for a zero amount, and throw IllegalStateException
if any matched.
|
getClauses, getExecutionPath, matchedClauses
getExecutionPath, getRequiredCommands, verify
public AnyOf(net.corda.core.contracts.clauses.Clause rawClauses)
Compose a number of clauses, such that one or more of the clauses can run.
public java.util.List<net.corda.core.contracts.clauses.Clause> getClauses()
List of clauses under this composite clause
public java.util.List<net.corda.core.contracts.clauses.Clause> matchedClauses(java.util.List<? extends net.corda.core.contracts.AuthenticatedObject<? extends C>> commands)
Determine which clauses are matched by the supplied commands.
class FirstOf
).public java.util.Set<C> verify(TransactionForContract tx, java.util.List<? extends S> inputs, java.util.List<? extends S> outputs, java.util.List<? extends net.corda.core.contracts.AuthenticatedObject<? extends C>> commands, K groupingKey)
Verify the transaction matches the conditions from this clause. For example, a "no zero amount output" clause would check each of the output states that it applies to, looking for a zero amount, and throw IllegalStateException if any matched.
tx
- the full transaction being verified. This is provided for cases where clauses need to access
states or commands outside of their normal scope.inputs
- input states which are relevant to this clause. By default this is the set passed into verifyClause,
but may be further reduced by clauses such as class GroupClauseVerifier
.outputs
- output states which are relevant to this clause. By default this is the set passed into verifyClause,
but may be further reduced by clauses such as class GroupClauseVerifier
.commands
- commands which are relevant to this clause. By default this is the set passed into verifyClause,
but may be further reduced by clauses such as class GroupClauseVerifier
.groupingKey
- a grouping key applied to states and commands, where applicable. Taken from
class TransactionForContract.InOutGroup
.public java.lang.String toString()