Context

class Context @JvmOverloads constructor(val input: CraftView, val crafterId: UUID, val recipe: CRecipe, val relation: MappedRelation, val asyncContext: AsyncContext? = null, val explainer: Explainer? = null)

Context for CRecipePredicate

Since

5.0.17

Parameters

input

Inspection target

crafterId

Crafter UUID

recipe

Recipe

relation

Pre-result of inspection

asyncContext

Async context (since 5.0.20). When non-null, test implementations should periodically check AsyncContext.isInterrupted and return early if true.

explainer

Diagnostic recorder of the running search (since 5.3.0). Non-null only when the caller passed one; write to it to record why this predicate rejected the input.

Constructors

Link copied to clipboard
constructor(input: CraftView, crafterId: UUID, recipe: CRecipe, relation: MappedRelation, asyncContext: AsyncContext? = null, explainer: Explainer? = null)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun copyWith(asyncContext: AsyncContext? = null): CRecipePredicate.Context

Copy with a given parameter

Link copied to clipboard

Returns whether this inspection is async.

Link copied to clipboard

If no async context exists, returns a newly added one.