public final class ExpConverter extends AbstractConverter implements tec.uom.lib.common.function.ValueSupplier<String>
This class represents a exponential converter of limited precision. Such converter is used to create inverse of logarithmic unit.
This class is package private, instances are created using the LogConverter.inverse() method.
AbstractConverter.PairIDENTITY, PI| Constructor and Description |
|---|
ExpConverter(double base)
Creates a logarithmic converter having the specified base.
|
| Modifier and Type | Method and Description |
|---|---|
BigDecimal |
convert(BigDecimal value,
MathContext ctx) |
double |
convert(double amount) |
boolean |
equals(Object obj) |
double |
getBase()
Returns the exponential base of this converter.
|
String |
getValue() |
int |
hashCode() |
AbstractConverter |
inverse() |
boolean |
isLinear() |
String |
toString() |
concatenate, concatenate, convert, getConversionSteps, isIdentitypublic ExpConverter(double base)
base - the logarithmic base (e.g. Math.E for the Natural Logarithm).public double getBase()
Math.E for the Natural Exponential).public AbstractConverter inverse()
inverse in interface javax.measure.UnitConverterinverse in class AbstractConverterpublic boolean equals(Object obj)
equals in class AbstractConverterpublic int hashCode()
hashCode in class AbstractConverterpublic double convert(double amount)
convert in interface javax.measure.UnitConverterconvert in class AbstractConverterpublic BigDecimal convert(BigDecimal value, MathContext ctx) throws ArithmeticException
convert in class AbstractConverterArithmeticExceptionpublic boolean isLinear()
isLinear in interface javax.measure.UnitConverterCopyright © 2005–2017 Units of Measurement project. All rights reserved.