Package tech.units.indriya.function
Interface MultiplyConverter
-
- All Superinterfaces:
Comparable<UnitConverter>,tech.uom.lib.common.function.Converter<Number,Number>,DoubleSupplier,tech.uom.lib.common.function.FactorSupplier<Number>,UnitConverter,tech.uom.lib.common.function.ValueSupplier<Number>
- All Known Implementing Classes:
PowerOfIntConverter,RationalConverter
public interface MultiplyConverter extends UnitConverter, tech.uom.lib.common.function.Converter<Number,Number>, tech.uom.lib.common.function.ValueSupplier<Number>, tech.uom.lib.common.function.FactorSupplier<Number>, DoubleSupplier, Comparable<UnitConverter>
This class represents a converter multiplying numeric values by a constant scaling factor represented by the
Numbertype.- Since:
- 1.0
- Version:
- 2.7, October 8, 2020
- Author:
- Jean-Marie Dautelle, Werner Keil, Andi Huber
-
-
Method Summary
All Methods Static Methods Instance Methods Default Methods Modifier and Type Method Description default NumbergetFactor()Returns the scale factor of this converter.static MultiplyConverteridentity()Returns a MultiplyConverter that acts as a 'pass-through'.default booleanisLinear()static MultiplyConverterof(double factor)Creates a MultiplyConverter with the specified constant factor.static MultiplyConverterof(Number factor)Creates a MultiplyConverter with the specified constant factor.static MultiplyConverterofExponent(int base, int exponent)Creates a MultiplyConverter with the specified base and exponent.static MultiplyConverterofPiExponent(int exponent)Creates a MultiplyConverter with the specified exponent of Pi.static MultiplyConverterofPrefix(Prefix prefix)Creates a MultiplyConverter with the specified Prefix.static MultiplyConverterofRational(long dividend, long divisor)Creates a MultiplyConverter with the specified rational factor made up ofdividendanddivisorstatic MultiplyConverterofRational(BigInteger dividend, BigInteger divisor)Creates a MultiplyConverter with the specified rational factor made up ofdividendanddivisorstatic MultiplyConverterofRational(RationalNumber factor)static MultiplyConverterofTenExponent(int exponent)Creates a MultiplyConverter with base 10 and an exponent.-
Methods inherited from interface java.lang.Comparable
compareTo
-
Methods inherited from interface java.util.function.DoubleSupplier
getAsDouble
-
Methods inherited from interface javax.measure.UnitConverter
concatenate, convert, convert, getConversionSteps, inverse, isIdentity
-
-
-
-
Method Detail
-
ofRational
static MultiplyConverter ofRational(RationalNumber factor)
-
ofRational
static MultiplyConverter ofRational(long dividend, long divisor)
Creates a MultiplyConverter with the specified rational factor made up ofdividendanddivisor- Parameters:
dividend-divisor-
-
ofRational
static MultiplyConverter ofRational(BigInteger dividend, BigInteger divisor)
Creates a MultiplyConverter with the specified rational factor made up ofdividendanddivisor- Parameters:
dividend-divisor-
-
of
static MultiplyConverter of(Number factor)
Creates a MultiplyConverter with the specified constant factor.- Parameters:
factor-- Returns:
-
of
static MultiplyConverter of(double factor)
Creates a MultiplyConverter with the specified constant factor.- Parameters:
factor- the double factor.- Returns:
- a new MultiplyConverter.
-
ofPrefix
static MultiplyConverter ofPrefix(Prefix prefix)
Creates a MultiplyConverter with the specified Prefix.- Parameters:
prefix- the prefix for the factor.- Returns:
- a new MultiplyConverter.
-
ofPiExponent
static MultiplyConverter ofPiExponent(int exponent)
Creates a MultiplyConverter with the specified exponent of Pi.- Parameters:
exponent- the exponent for the factor π^exponent.- Returns:
- a new MultiplyConverter.
-
ofExponent
static MultiplyConverter ofExponent(int base, int exponent)
Creates a MultiplyConverter with the specified base and exponent.- Parameters:
base- the base.exponent- the exponent.- Returns:
- a new MultiplyConverter.
-
ofTenExponent
static MultiplyConverter ofTenExponent(int exponent)
Creates a MultiplyConverter with base 10 and an exponent.- Parameters:
exponent- the exponent for the factor 10^exponent.
-
identity
static MultiplyConverter identity()
Returns a MultiplyConverter that acts as a 'pass-through'.
-
isLinear
default boolean isLinear()
- Specified by:
isLinearin interfaceUnitConverter
-
-