AttributeDescriptor

fun <A, T, B> AttributeDescriptor(name: String, getter: (T) -> A, setter: B.(A) -> Unit, converter: ValueConverter<A>): AttributeDescriptor<A, T, B>

Instantiates a new AttributeDescriptor

Parameters

name

The name of the attribute

getter

A function which extracts a value of type A from an object of type T

setter

A function which operates on a builder of type B and mutates a value of type A

converter

A ValueConverter which defines how an object value is converted to an attribute value and vice versa

Type Parameters

A

The type of value extracted by getter, accepted by setter, and used by converter

T

The type of object from which values are extracted

B

The type of builder object in which values are mutated