split

Splits a ScientificArray into a list of DefaultScientificValue of all the values in the array

Return

a list of DefaultScientificValue in Unit for all values stored in the array

Type Parameters

Quantity

the type of PhysicalQuantity of the unit

Unit

the type of AbstractScientificUnit of the array

NumberType

the type of Number stored in the array


Splits a ScientificArray into a list of DefaultScientificValue in TargetUnit of all the values in the array

Return

a list of DefaultScientificValue in TargetUnit for all values stored in the array

Parameters

targetUnit

the TargetUnit the resulting DefaultScientificValue should be in

Type Parameters

Quantity

the type of PhysicalQuantity of the unit

Unit

the type of ScientificUnit of the array

NumberType

the type of Number stored in the array

TargetUnit

the type of AbstractScientificUnit the resulting DefaultScientificValue should be in


Splits a ScientificArray into a list of TargetValue of all the values in the array

Return

a list of TargetValue for all values stored in the array

Parameters

factory

method for creating TargetValue from a Decimal and Unit

Type Parameters

Quantity

the type of PhysicalQuantity of the unit

Unit

the type of ScientificUnit of the array

NumberType

the type of Number stored in the array

TargetValue

the type of ScientificValue to return


Splits a ScientificArray into a list of TargetValue of all the values in the array

Return

a list of TargetValue for all values stored in the array

Parameters

targetUnit

the TargetUnit the resulting TargetValue should be in

factory

method for creating TargetValue from a Decimal and TargetUnit

Type Parameters

Quantity

the type of PhysicalQuantity of the unit

Unit

the type of ScientificUnit of the array

NumberType

the type of Number stored in the array

TargetUnit

the type of ScientificUnit the resulting TargetValue should be in

TargetValue

the type of ScientificValue to return


Splits a ScientificValue of ValueUnit into a LeftValue and RightValue so that left and right together are equal to the original value. Splitting happens by rounding the ValueUnit down to scale and returning it and the remainder converted to RightUnit.

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

Return

a Pair of LeftValue and RightValue where LeftValue is rounded down to scale and RightValue contains the remainder.

Parameters

rightUnit

the RightUnit to split into.

scale

the number of decimals to which to round LeftValue

roundingThreshold

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

leftFactory

a factory method for creating LeftValue

rightFactory

a factory method for creating RightValue

Type Parameters

System

the MeasurementSystem of the units to split

Quantity

the PhysicalQuantity of the units to split

ValueUnit

the ScientificUnit of the ScientificValue to split and use as the left (rounded) unit for LeftValue

LeftValue

the ScientificValue that will be returned as the left (rounded) value

RightUnit

the SystemScientificUnit to use as the right unit for RightValue. It is recommended that 1 RightUnit<1 ValueUnit

RightValue

the ScientificValue that will be returned as the right value


Splits a ScientificValue of ValueUnit into a DefaultScientificValue of ValueUnit and DefaultScientificValue of RightUnit so that left and right together are equal to the original value. Splitting happens by rounding the ValueUnit down to scale and returning it and the remainder converted to RightUnit.

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

Return

a Pair of DefaultScientificValue and RightUnit where in ValueUnit and RightUnit respectively where the value in ValueUnit is rounded down to scale and the value in RightUnit contains the remainder.

Parameters

rightUnit

the RightUnit to split into.

scale

the number of decimals to which to round the value of ValueUnit

roundingThreshold

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

Type Parameters

System

the MeasurementSystem of the units to split

Quantity

the PhysicalQuantity of the units to split

ValueUnit

the ScientificUnit of the ScientificValue to split and to use as the left (rounded) unit the left DefaultScientificValue

RightUnit

the SystemScientificUnit to use as the right unit for the right DefaultScientificValue. It is recommended that 1 RightUnit<1 ValueUnit


Splits a ScientificValue of ValueUnit into a LeftValue and RightValue so that left and right together are equal to the original value. Splitting happens by converting the ValueUnit to LeftUnit and then rounding down to scale and returning it and the remainder converted to RightUnit.

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

Return

a Pair of LeftValue and RightValue where LeftValue is rounded down to scale and RightValue contains the remainder.

Parameters

leftUnit

the LeftUnit to split (and round)

rightUnit

the RightUnit to split into.

scale

the number of decimals to which to round LeftValue

roundingThreshold

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

leftFactory

a factory method for creating LeftValue

rightFactory

a factory method for creating RightValue

Type Parameters

System

the MeasurementSystem of the units to split

Quantity

the PhysicalQuantity of the units to split

ValueUnit

the ScientificUnit of the ScientificValue to split

LeftUnit

the SystemScientificUnit to use as the left (rounded) unit for LeftValue

LeftValue

the ScientificValue that will be returned as the left (rounded) value

RightUnit

the SystemScientificUnit to use as the right unit for RightValue. It is recommended that 1 RightUnit<1 LeftUnit

RightValue

the ScientificValue that will be returned as the right value


Splits a ScientificValue of ValueUnit into a DefaultScientificValue of LeftUnit and DefaultScientificValue of RightUnit so that left and right together are equal to the original value. Splitting happens by converting the ValueUnit to LeftUnit and then rounding down to scale and returning it and the remainder converted to RightUnit.

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

Return

a Pair of DefaultScientificValue and RightUnit where in LeftUnit and RightUnit respectively where the value in LeftUnit is rounded down to scale and the value in RightUnit contains the remainder.

Parameters

leftUnit

the LeftUnit to split (and round)

rightUnit

the RightUnit to split into.

scale

the number of decimals to which to round the value of LeftUnit

roundingThreshold

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

Type Parameters

System

the MeasurementSystem of the units to split

Quantity

the PhysicalQuantity of the units to split

ValueUnit

the ScientificUnit of the ScientificValue to split

LeftUnit

the SystemScientificUnit to use as the left (rounded) unit the left DefaultScientificValue

RightUnit

the SystemScientificUnit to use as the right unit for the right DefaultScientificValue. It is recommended that 1 RightUnit<1 LeftUnit