AttributeDescriptor

interface AttributeDescriptor<A, T, B>

Describes a single item attribute and how it is converted from an object of type T and to a build object of type B.

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

Properties

Link copied to clipboard
abstract val converter: ValueConverter<A>

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

Link copied to clipboard
abstract val getter: (T) -> A

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

Link copied to clipboard
abstract val name: String

The name of the attribute

Link copied to clipboard
abstract val setter: B.(A) -> Unit

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