Top Description Fields Constructors Methods
tech.units.indriya.internal.function.radix

public Class MixedRadixSupport

extends Object
Class Inheritance
Annotations
@API
status:INTERNAL
Static Imports
org.apiguardian.api.API.Status.INTERNAL

Internal utility class to support MixedRadix.
Author
Andi Huber
Since
2.0

Field Summary

Modifier and TypeField and Description
private final Radix[]

Constructor Summary

AccessConstructor and Description
public
MixedRadixSupport(Radix[]
- most significant first
radices
)

Method Summary

Modifier and TypeMethod and Description
private int
invertIndex(int index)

public Number

Returns:

sum of values each converted to the 'scale' of the trailing radix (the least significant), as given by the constructor of this instance
sumMostSignificant
(Number[]
- numbers corresponding to the radices in most significant first order, allowed to be of shorter length than the total count of radices
values
)

public void
visitRadixNumbers(Number trailingRadixValue, Consumer<Number>
- gets past over the extracted numbers in least significant first order
numberVisitor
)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

radicesback to summary
private final Radix[] radices

Constructor Detail

MixedRadixSupportback to summary
public MixedRadixSupport(Radix[] radices)
Parameters
radices:Radix[]

- most significant first

Method Detail

invertIndexback to summary
private int invertIndex(int index)
sumMostSignificantback to summary
public Number sumMostSignificant(Number[] values)
Parameters
values:Number[]

- numbers corresponding to the radices in most significant first order, allowed to be of shorter length than the total count of radices

Returns:Number

sum of values each converted to the 'scale' of the trailing radix (the least significant), as given by the constructor of this instance

visitRadixNumbersback to summary
public void visitRadixNumbers(Number trailingRadixValue, Consumer<Number> numberVisitor)
Parameters
numberVisitor:Consumer<Number>

- gets past over the extracted numbers in least significant first order