toComponents

Breaks up a ScientificValue of Quantity into its components in UnitOne, UnitTwo and executes the given action with these components. A value is broken up into its components by converting the value to to UnitOne and splitting into UnitTwo using scale.

Splitting can only be done between AbstractScientificUnit using the same MeasurementSystem. To account for rounding errors, a roundingThreshold can be set. If the non-rounded value in UnitOne is within this threshold, it will be rounded up.

Return

the Result returned by action

Parameters

one

the UnitOne to use.

two

the UnitTwo to use.

scale

the number of decimals to which to round the DefaultScientificValue in UnitOne

roundingThreshold

the threshold at which DefaultScientificValue will be rounded up instead of down to the nearest value at scale

action

the action that converts components of DefaultScientificValue in UnitOne and UnitTwo into Result

Type Parameters

System

the MeasurementSystem of the units to split

Quantity

the PhysicalQuantity of the units to split

Unit

the ScientificUnit of the ScientificValue to split

UnitOne

the AbstractScientificUnit to use as the first (rounded) component.

UnitTwo

the AbstractScientificUnit to use as the second component.

Result

the type of result to be returned.

See also


Breaks up a ScientificValue of Quantity into its components in UnitOne, UnitTwo, UnitThree and executes the given action with these components. A value is broken up into its components by converting the value to to UnitOne and splitting into UnitTwo using scale, then splitting the remainder into UnitThree.

Splitting can only be done between AbstractScientificUnit using the same MeasurementSystem. To account for rounding errors, a roundingThreshold can be set. If the non-rounded value in any unit (except for UnitThree) is within this threshold, it will be rounded up.

Return

the Result returned by action

Parameters

one

the UnitOne to use.

two

the UnitTwo to use.

three

the UnitThree to use.

scale

the number of decimals to which to round all DefaultScientificValue except for the value in UnitThree

roundingThreshold

the threshold at which DefaultScientificValue will be rounded up instead of down to the nearest value at scale

action

the action that converts components of DefaultScientificValue in UnitOne, UnitTwo, and UnitThree into Result

Type Parameters

System

the MeasurementSystem of the units to split

Quantity

the PhysicalQuantity of the units to split

Unit

the ScientificUnit of the ScientificValue to split

UnitOne

the AbstractScientificUnit to use as the first (rounded) component.

UnitTwo

the AbstractScientificUnit to use as the second (rounded) component.

UnitThree

the AbstractScientificUnit to use as the third component.

Result

the type of result to be returned.

See also


Breaks up a ScientificValue of Quantity into its components in UnitOne, UnitTwo, UnitThree, UnitFour and executes the given action with these components. A value is broken up into its components by converting the value to to UnitOne and splitting into UnitTwo using scale, then splitting the remainder into UnitThree and so on.

Splitting can only be done between AbstractScientificUnit using the same MeasurementSystem. To account for rounding errors, a roundingThreshold can be set. If the non-rounded value in any unit (except for UnitFour) is within this threshold, it will be rounded up.

Return

the Result returned by action

Parameters

one

the UnitOne to use.

two

the UnitTwo to use.

three

the UnitThree to use.

four

the UnitFour to use.

scale

the number of decimals to which to round all DefaultScientificValue except for the value in UnitFour

roundingThreshold

the threshold at which DefaultScientificValue will be rounded up instead of down to the nearest value at scale

action

the action that converts components of DefaultScientificValue in UnitOne, UnitTwo, UnitThree, and UnitFour into Result

Type Parameters

System

the MeasurementSystem of the units to split

Quantity

the PhysicalQuantity of the units to split

Unit

the ScientificUnit of the ScientificValue to split

UnitOne

the AbstractScientificUnit to use as the first (rounded) component.

UnitTwo

the AbstractScientificUnit to use as the second (rounded) component.

UnitThree

the AbstractScientificUnit to use as the third (rounded) component.

UnitFour

the AbstractScientificUnit to use as the fourth component.

Result

the type of result to be returned.

See also


Breaks up a ScientificValue of Quantity into its components in UnitOne, UnitTwo, UnitThree, UnitFour, UnitFive and executes the given action with these components. A value is broken up into its components by converting the value to to UnitOne and splitting into UnitTwo using scale, then splitting the remainder into UnitThree and so on.

Splitting can only be done between AbstractScientificUnit using the same MeasurementSystem. To account for rounding errors, a roundingThreshold can be set. If the non-rounded value in any unit (except for UnitFive) is within this threshold, it will be rounded up.

Return

the Result returned by action

Parameters

one

the UnitOne to use.

two

the UnitTwo to use.

three

the UnitThree to use.

four

the UnitFour to use.

five

the UnitFive to use.

scale

the number of decimals to which to round all DefaultScientificValue except for the value in UnitFive

roundingThreshold

the threshold at which DefaultScientificValue will be rounded up instead of down to the nearest value at scale

action

the action that converts components of DefaultScientificValue in UnitOne, UnitTwo, UnitThree, UnitFour, and UnitFive into Result

Type Parameters

System

the MeasurementSystem of the units to split

Quantity

the PhysicalQuantity of the units to split

Unit

the ScientificUnit of the ScientificValue to split

UnitOne

the AbstractScientificUnit to use as the first (rounded) component.

UnitTwo

the AbstractScientificUnit to use as the second (rounded) component.

UnitThree

the AbstractScientificUnit to use as the third (rounded) component.

UnitFour

the AbstractScientificUnit to use as the fourth (rounded) component.

UnitFive

the AbstractScientificUnit to use as the fifth component.

Result

the type of result to be returned.

See also