SetFactory

class SetFactory<T : Any> : Factory<Set<T>> (source)

A Factory implementation used to implement Set bindings. This factory always returns a new Set instance for each call to invoke (as required by Factory) whose elements are populated by subsequent calls to their Provider.invoke methods.

Types

Link copied to clipboard
class Builder<T : Any>

A builder to accumulate Provider<T> and Provider<Collection<T>> instances. These are only intended to be single-use and from within generated code. Do NOT add providers after calling build.

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
inline fun <T, R> Provider<T>.flatMap(crossinline transform: (T) -> Provider<R>): Provider<R>

Lazily maps this Provider's value to another Provider of type R.

Link copied to clipboard
open operator override fun invoke(): Set<T>

Returns a Set that contains the elements given by each of the providers.

Link copied to clipboard
inline fun <T, R> Provider<T>.map(crossinline transform: (T) -> R): Provider<R>

Lazily maps this Provider's value to another Provider of type R.

Link copied to clipboard

Returns a memoizing Provider instance of this provider.

Link copied to clipboard

Returns a memoizing Lazy instance of this provider.

Link copied to clipboard
inline fun <T, R, V> Provider<T>.zip(other: Provider<R>, crossinline transform: (T, R) -> V): Provider<V>

Lazily zips this Provider's value with another Provider of type R and returns a Provider of type V.