# add

abstract fun add(ruleClass: Class<out AttributeCompatibilityRule<T>>)(source)

Adds an arbitrary compatibility rule to the chain.

A compatibility rule can tell if two values are compatible. Compatibility doesn't mean equality. Typically two different Java platforms can be compatible, without being equal.

A rule can express an opinion by calling the compatible method to tell that two attributes are compatible, or it can call incompatible to say that they are not compatible. It is not mandatory for a rule to express an opinion.

#### Since

4.0

#### Parameters

ruleClass

the rule to add to the chain

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

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

#### Since

4.0

#### Parameters

ruleClass

the rule to add to the chain

configureAction

the action to use to configure the rule