In package com.copperleaf.trellis.api

class com.copperleaf.trellis.api.AlsoSpek

Adds a new candidate to the Spek chain, to be evaluated by a matching Spek. This allows a single Spek to be evaluated with multiple disparate input argument candidates, where each candidate has its own evaluation subtree. The new candidate is itself a Spek, so can pass the result of one subtree to a new subtree, or you can just pass a value or lambda directly as the value.

Constructors

public <init>(com.copperleaf.trellis.api.AlsoSpek.V, com.copperleaf.trellis.api.Spek((com.copperleaf.trellis.api.AlsoSpek.V, com.copperleaf.trellis.api.AlsoSpek.U)))

Parameters:
public <init>(kotlin.Function0((com.copperleaf.trellis.api.AlsoSpek.V)), com.copperleaf.trellis.api.Spek((com.copperleaf.trellis.api.AlsoSpek.V, com.copperleaf.trellis.api.AlsoSpek.U)))

Parameters:
public <init>(com.copperleaf.trellis.api.Spek((com.copperleaf.trellis.api.AlsoSpek.T, com.copperleaf.trellis.api.AlsoSpek.V)), com.copperleaf.trellis.api.Spek((com.copperleaf.trellis.api.AlsoSpek.V, com.copperleaf.trellis.api.AlsoSpek.U)))

Adds a new candidate to the Spek chain, to be evaluated by a matching Spek. This allows a single Spek to be evaluated with multiple disparate input argument candidates, where each candidate has its own evaluation subtree. The new candidate is itself a Spek, so can pass the result of one subtree to a new subtree, or you can just pass a value or lambda directly as the value.

Parameters:

Methods

public final suspend evaluate(com.copperleaf.trellis.api.AlsoSpek.T): com.copperleaf.trellis.api.AlsoSpek.U

Parameters:
  • candidate: com.copperleaf.trellis.api.AlsoSpek.T

Extensions

public final infix and(com.copperleaf.trellis.api.Spek((com.copperleaf.trellis.api.and.T, kotlin.Boolean)), com.copperleaf.trellis.api.Spek((com.copperleaf.trellis.api.and.T, kotlin.Boolean))): com.copperleaf.trellis.api.Spek

Parameters:
public final infix andNot(com.copperleaf.trellis.api.Spek((com.copperleaf.trellis.api.andNot.T, kotlin.Boolean)), com.copperleaf.trellis.api.Spek((com.copperleaf.trellis.api.andNot.T, kotlin.Boolean))): com.copperleaf.trellis.api.Spek

Parameters:
public final infix or(com.copperleaf.trellis.api.Spek((com.copperleaf.trellis.api.or.T, kotlin.Boolean)), com.copperleaf.trellis.api.Spek((com.copperleaf.trellis.api.or.T, kotlin.Boolean))): com.copperleaf.trellis.api.Spek

Parameters:
public final infix orNot(com.copperleaf.trellis.api.Spek((com.copperleaf.trellis.api.orNot.T, kotlin.Boolean)), com.copperleaf.trellis.api.Spek((com.copperleaf.trellis.api.orNot.T, kotlin.Boolean))): com.copperleaf.trellis.api.Spek

Parameters:
public final not(com.copperleaf.trellis.api.Spek((com.copperleaf.trellis.api.not.T, kotlin.Boolean))): com.copperleaf.trellis.api.Spek

Parameters:
  • No parameters
public final operator plus(com.copperleaf.trellis.api.Spek((com.copperleaf.trellis.api.plus.T, kotlin.Boolean)), com.copperleaf.trellis.api.Spek((com.copperleaf.trellis.api.plus.T, kotlin.Boolean))): com.copperleaf.trellis.api.Spek

Parameters:
public final operator plus(com.copperleaf.trellis.api.Spek((com.copperleaf.trellis.api.plus.T, kotlin.Number)), com.copperleaf.trellis.api.Spek((com.copperleaf.trellis.api.plus.T, kotlin.Number))): com.copperleaf.trellis.api.AddSpek

Parameters:
public final operator plus(com.copperleaf.trellis.api.Spek((com.copperleaf.trellis.api.plus.T, kotlin.Number)), kotlin.Number): com.copperleaf.trellis.api.AddSpek

Parameters:
  • other: Number
public final operator unaryMinus(com.copperleaf.trellis.api.Spek((com.copperleaf.trellis.api.unaryMinus.T, kotlin.Boolean))): com.copperleaf.trellis.api.Spek

Parameters:
  • No parameters
public final then(com.copperleaf.trellis.api.Spek((com.copperleaf.trellis.api.then.T, kotlin.Boolean)), com.copperleaf.trellis.api.Spek((com.copperleaf.trellis.api.then.T, com.copperleaf.trellis.api.then.U)), com.copperleaf.trellis.api.Spek((com.copperleaf.trellis.api.then.T, com.copperleaf.trellis.api.then.U))): com.copperleaf.trellis.api.Spek

Parameters:
public final evaluateSync(com.copperleaf.trellis.api.Spek((com.copperleaf.trellis.api.evaluateSync.T, com.copperleaf.trellis.api.evaluateSync.U)), com.copperleaf.trellis.api.evaluateSync.T): com.copperleaf.trellis.api.evaluateSync.U

Parameters:
  • candidate: com.copperleaf.trellis.api.evaluateSync.T
public final evaluateAsync(com.copperleaf.trellis.api.Spek((com.copperleaf.trellis.api.evaluateAsync.T, com.copperleaf.trellis.api.evaluateAsync.U)), com.copperleaf.trellis.api.evaluateAsync.T, kotlin.Function1((com.copperleaf.trellis.api.evaluateAsync.U, kotlin.Unit))): Unit

Parameters:
  • candidate: com.copperleaf.trellis.api.evaluateAsync.T
  • onComplete: Function1
public final operator minus(com.copperleaf.trellis.api.Spek((com.copperleaf.trellis.api.minus.T, kotlin.Number)), com.copperleaf.trellis.api.Spek((com.copperleaf.trellis.api.minus.T, kotlin.Number))): com.copperleaf.trellis.api.SubtractSpek

Parameters:
public final operator minus(com.copperleaf.trellis.api.Spek((com.copperleaf.trellis.api.minus.T, kotlin.Number)), kotlin.Number): com.copperleaf.trellis.api.SubtractSpek

Parameters:
  • other: Number