ConverterCompositionHandler
public class UnitCompositionHandlerYieldingNormalForm extends Object implements ConverterCompositionHandler
Constructor | Description |
---|---|
UnitCompositionHandlerYieldingNormalForm() |
Modifier and Type | Method | Description |
---|---|---|
AbstractConverter |
compose(AbstractConverter a,
AbstractConverter b,
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: |
yieldingNormalForm
public UnitCompositionHandlerYieldingNormalForm()
public AbstractConverter compose(AbstractConverter a, AbstractConverter b, BiPredicate<AbstractConverter,AbstractConverter> canReduce, BinaryOperator<AbstractConverter> doReduce)
ConverterCompositionHandler
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.
compose
in interface ConverterCompositionHandler
Copyright © 2005–2020 Units of Measurement project. All rights reserved.