Documentation / dataflow-async / com.femastudios.dataflow.async.util / attributeOf
Go to reference

attributeOf

fun <T> attributeOf(value: T): Attribute<T>

Returns a new Attribute of type T whose state is always Loaded with a value of value


fun <T> attributeOf(data: AttributeData<T>): Attribute<T>

Returns a new Attribute of type T whose state is always data

See Also

AttributeData


@JvmOverloads fun <T> attributeOf(lazy: Boolean = true, flowStrategy: FlowStrategy = FlowStrategy.CONSISTENT, task: WorkContext.() -> T): RecomputableAttribute<T>

Returns a new RecomputableAttribute with the associated task.

Parameters

lazy - when lazy the attributes starts calculating only when firstly accessed.

flowStrategy - the FlowStrategy to use

See Also

WorkContext