# MergerContract

interface MergerContract<Type> : Transformer.TransformationContract

Contract which describes merge transformation

Always check conditions you've defined through isComplete implementation you can get unpredictable behavior if more than one contract would be able to process value

## Functions

isComplete
Link copied to clipboard
abstract fun isComplete(values: List<Type>): Boolean

Check if `this` contract is applicable to whole values list. Note that only one MergerContract shall return true for this values in whole transformationContractList. Else MoreThanOneContractApplicable will be thrown.

isSupported
Link copied to clipboard
abstract fun isSupported(value: Type): Boolean

Check if `this` contract could handle value

transform
Link copied to clipboard
abstract fun transform(values: List<Type>): Type

Performs an actual transformation of all the messages into single one