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>
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 Number
type.
Modifier and Type | Method | Description |
---|---|---|
default Number |
getFactor() |
Returns the scale factor of this converter.
|
static MultiplyConverter |
identity() |
Returns a MultiplyConverter that acts as a 'pass-through'.
|
default boolean |
isLinear() |
|
static MultiplyConverter |
of(double factor) |
Creates a MultiplyConverter with the specified constant factor.
|
static MultiplyConverter |
of(Number factor) |
Creates a MultiplyConverter with the specified constant factor.
|
static MultiplyConverter |
ofExponent(int base,
int exponent) |
Creates a MultiplyConverter with the specified base and exponent.
|
static MultiplyConverter |
ofPiExponent(int exponent) |
Creates a MultiplyConverter with the specified exponent of Pi.
|
static MultiplyConverter |
ofPrefix(javax.measure.Prefix prefix) |
Creates a MultiplyConverter with the specified Prefix.
|
static MultiplyConverter |
ofRational(long dividend,
long divisor) |
Creates a MultiplyConverter with the specified rational factor made up of
dividend and divisor |
static MultiplyConverter |
ofRational(BigInteger dividend,
BigInteger divisor) |
Creates a MultiplyConverter with the specified rational factor made up of
dividend and divisor |
static MultiplyConverter |
ofRational(RationalNumber factor) |
|
static MultiplyConverter |
ofTenExponent(int exponent) |
Creates a MultiplyConverter with base 10 and an exponent.
|
compareTo
static MultiplyConverter ofRational(RationalNumber factor)
static MultiplyConverter ofRational(long dividend, long divisor)
dividend
and divisor
dividend
- divisor
- static MultiplyConverter ofRational(BigInteger dividend, BigInteger divisor)
dividend
and divisor
dividend
- divisor
- static MultiplyConverter of(Number factor)
factor
- static MultiplyConverter of(double factor)
factor
- the double factor.static MultiplyConverter ofPrefix(javax.measure.Prefix prefix)
prefix
- the prefix for the factor.static MultiplyConverter ofPiExponent(int exponent)
exponent
- the exponent for the factor π^exponent.static MultiplyConverter ofExponent(int base, int exponent)
base
- the base.exponent
- the exponent.static MultiplyConverter ofTenExponent(int exponent)
exponent
- the exponent for the factor 10^exponent.static MultiplyConverter identity()
default boolean isLinear()
isLinear
in interface javax.measure.UnitConverter
Copyright © 2005–2020 Units of Measurement project. All rights reserved.