# DisambiguationRuleChain

interface DisambiguationRuleChain<T>(source)

A chain of disambiguation rules. By default the chain is empty and will not do any disambiguation.

For a given set of rules, the execution is done in order, and interrupts as soon as a rule selected at least one candidate (through closestMatch).

If the end of the rule chain is reached and that no rule selected a candidate then the candidate list is returned unmodified, meaning we still have an ambiguous match.

#### Parameters

<T>

the concrete type of the attribute

## Functions

add
Link copied to clipboard
abstract fun add(ruleClass: Class<out AttributeDisambiguationRule<T>>)
Adds an arbitrary disambiguation rule to the chain.
abstract fun add(ruleClass: Class<out AttributeDisambiguationRule<T>>, configureAction: Action<in ActionConfiguration>)
Adds an arbitrary disambiguation rule to the chain, possibly configuring the rule as well.
pickFirst
Link copied to clipboard
abstract fun pickFirst(comparator: Comparator<in T>)
Adds an ordered disambiguation rule.
pickLast
Link copied to clipboard
abstract fun pickLast(comparator: Comparator<in T>)
Adds an ordered disambiguation rule.