Top Description Methods
org.opentest4j.reporting.events.api

public Interface Factory<T>

Annotations
@FunctionalInterface
@API
status:EXPERIMENTAL
since:0.1.0
Type Parameters
<T>
the type of element to create
Imports
org.apiguardian.api.API, java.util.function.Consumer

Factory for creating elements of a certain type for a given context.
Since
0.1.0

Method Summary

Modifier and TypeMethod and Description
public T

Returns:

the created element
create
(Context
the context to use
context
)

Create an element using the supplied context.

public default T

Returns:

the created element
createAndConfigure
(Context
the context to use
context
,
Consumer<? super T>
the configurer to use
configurer
)

Create and configure an element using the supplied context and configurer.

Method Detail

createback to summary
public T create(Context context)

Create an element using the supplied context.

Parameters
context:Context

the context to use

Returns:T

the created element

createAndConfigureback to summary
public default T createAndConfigure(Context context, Consumer<? super T> configurer)

Create and configure an element using the supplied context and configurer.

Parameters
context:Context

the context to use

configurer:Consumer<? super T>

the configurer to use

Returns:T

the created element