Package tech.units.indriya.function
Interface ConverterCompositionHandler
-
public interface ConverterCompositionHandler
Functional interface for handling the composition (concatenation) of two unit converters.- Since:
- 2.0
- Version:
- 1.2
- Author:
- Andi Huber, Werner Keil
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description AbstractConvertercompose(AbstractConverter left, AbstractConverter right, BiPredicate<AbstractConverter,AbstractConverter> canReduce, BinaryOperator<AbstractConverter> doReduce)Takes two convertersleft,rightand returns a (not necessarily new) converter that is equivalent to the mathematical composition of these:static ConverterCompositionHandleryieldingNormalForm()
-
-
-
Method Detail
-
compose
AbstractConverter compose(AbstractConverter left, AbstractConverter right, BiPredicate<AbstractConverter,AbstractConverter> canReduce, BinaryOperator<AbstractConverter> doReduce)
Takes two convertersleft,rightand 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.
- Parameters:
left-right-canReduce-doReduce-- Returns:
-
yieldingNormalForm
static ConverterCompositionHandler yieldingNormalForm()
- Returns:
- the default built-in UnitCompositionHandler which is yielding a normal-form, required to decide whether two UnitConverters are equivalent
-
-