# add

abstract fun add(rule: Class<out AttributeDisambiguationRule<T>>)(source)

Adds an arbitrary disambiguation rule to the chain.

A disambiguation rule can select the best match from a list of candidates.

A rule can express an preference by calling the @{link closestMatch method to tell that a candidate is the best one.

It is not mandatory for a rule to choose, and it is not an error to select multiple candidates.

#### Since

4.0

#### Parameters

rule

the rule to add

abstract fun add(rule: Class<out AttributeDisambiguationRule<T>>, configureAction: Action<in ActionConfiguration>)(source)

Adds an arbitrary disambiguation rule to the chain, possibly configuring the rule as well.

#### Since

4.0

#### Parameters

rule

the rule to add

configureAction

the action to use to configure the rule