Package tech.units.indriya.function
Interface MultiplyConverter
-
- All Superinterfaces:
Comparable<javax.measure.UnitConverter>,tech.uom.lib.common.function.Converter<Number,Number>,tech.uom.lib.common.function.FactorSupplier<Number>,javax.measure.UnitConverter,tech.uom.lib.common.function.ValueSupplier<Number>
- All Known Implementing Classes:
PowerOfIntConverter,RationalConverter
public interface MultiplyConverter extends javax.measure.UnitConverter, tech.uom.lib.common.function.Converter<Number,Number>, tech.uom.lib.common.function.ValueSupplier<Number>, tech.uom.lib.common.function.FactorSupplier<Number>, Comparable<javax.measure.UnitConverter>
This class represents a converter multiplying numeric values by a constant scaling factor represented by the
Numbertype.- Since:
- 1.0
- Version:
- 2.6, September 10, 2019
- Author:
- Jean-Marie Dautelle, Werner Keil, Andi Huber
-
-
Method Summary
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(javax.measure.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
-
-
-
-
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(javax.measure.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 interfacejavax.measure.UnitConverter
-
-