Top Description Methods
tech.units.indriya.function

public Interface ConverterCompositionHandler

Known Direct Implementers
tech.units.indriya.internal.function.simplify.UnitCompositionHandlerYieldingNormalForm
Imports
java.util.function.BiPredicate, .BinaryOperator, tech.units.indriya.internal.function.simplify.UnitCompositionHandlerYieldingNormalForm

Functional interface for handling the composition (concatenation) of two unit converters.
Authors
Andi Huber, Werner Keil
Since
2.0
Version
1.2

Method Summary

Modifier and TypeMethod and Description
public AbstractConverter
compose(AbstractConverter left, AbstractConverter right, BiPredicate<AbstractConverter, AbstractConverter> canReduce, BinaryOperator<AbstractConverter> doReduce)

Takes two converters left, right and returns a (not necessarily new) converter that is equivalent to the mathematical composition of these:

compose(left, right) === left o right

Implementation Note: Instead of using AbstractConverter as parameter and result types, this could be generalized to UnitConverter, but that would require some careful changes within AbstractConverter itself.

public static ConverterCompositionHandler

Returns:

the default built-in UnitCompositionHandler which is yielding a normal-form, required to decide whether two UnitConverters are equivalent
yieldingNormalForm
()

Method Detail

composeback to summary
public AbstractConverter compose(AbstractConverter left, AbstractConverter right, BiPredicate<AbstractConverter, AbstractConverter> canReduce, BinaryOperator<AbstractConverter> doReduce)

Takes two converters left, right and returns a (not necessarily new) converter that is equivalent to the mathematical composition of these:

compose(left, right) === left o right

Implementation Note: Instead of using AbstractConverter as parameter and result types, this could be generalized to UnitConverter, but that would require some careful changes within AbstractConverter itself.

yieldingNormalFormback to summary
public static ConverterCompositionHandler yieldingNormalForm()
Returns:ConverterCompositionHandler

the default built-in UnitCompositionHandler which is yielding a normal-form, required to decide whether two UnitConverters are equivalent