public final class ExpConverter extends AbstractConverter implements tech.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 AbstractConverter.inverse() method.
AbstractConverter.PairconversionSteps, IDENTITY| Constructor and Description |
|---|
ExpConverter(double base)
Creates a logarithmic converter having the specified base.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(javax.measure.UnitConverter o) |
BigDecimal |
convertWhenNotIdentity(BigDecimal value,
MathContext ctx)
Non-API
|
double |
convertWhenNotIdentity(double amount)
Non-API
|
boolean |
equals(Object obj) |
double |
getBase()
Returns the exponential base of this converter.
|
String |
getValue() |
int |
hashCode() |
AbstractConverter |
inverseWhenNotIdentity()
Non-API
|
boolean |
isIdentity() |
boolean |
isLinear() |
protected boolean |
isSimpleCompositionWith(AbstractConverter that)
Non-API
Guard for
AbstractConverter.simpleCompose(AbstractConverter) |
static ExpConverter |
of(double base)
Creates a logarithmic converter having the specified base.
|
protected AbstractConverter |
simpleCompose(AbstractConverter that)
Non-API
Guarded by
AbstractConverter.isSimpleCompositionWith(AbstractConverter) |
String |
transformationLiteral()
Non-API
|
concatenate, convert, convert, convertWhenNotIdentity, getConversionSteps, inverse, of, toStringpublic ExpConverter(double base)
base - the logarithmic base (e.g. Math.E for the Natural Logarithm).public static ExpConverter of(double base)
base - the logarithmic base (e.g. Math.E for the Natural Logarithm).public double getBase()
Math.E for the Natural Exponential).public boolean isIdentity()
isIdentity in interface javax.measure.UnitConverterprotected boolean isSimpleCompositionWith(AbstractConverter that)
AbstractConverterAbstractConverter.simpleCompose(AbstractConverter)isSimpleCompositionWith in class AbstractConverterprotected AbstractConverter simpleCompose(AbstractConverter that)
AbstractConverterAbstractConverter.isSimpleCompositionWith(AbstractConverter)simpleCompose in class AbstractConverterpublic AbstractConverter inverseWhenNotIdentity()
AbstractConverterReturns an AbstractConverter that represents the inverse transformation of this converter, for cases where the transformation is not the identity transformation.
inverseWhenNotIdentity in class AbstractConverterpublic final String transformationLiteral()
AbstractConverter
Returns a String describing the transformation that is represented by this converter.
Contributes to converter's toString method. If null or empty
toString output becomes simplified.
transformationLiteral in class AbstractConverterpublic boolean equals(Object obj)
equals in class AbstractConverterpublic int hashCode()
hashCode in class AbstractConverterpublic double convertWhenNotIdentity(double amount)
AbstractConverterconvertWhenNotIdentity in class AbstractConverterpublic BigDecimal convertWhenNotIdentity(BigDecimal value, MathContext ctx) throws ArithmeticException
AbstractConverterconvertWhenNotIdentity in class AbstractConverterArithmeticExceptionpublic boolean isLinear()
isLinear in interface javax.measure.UnitConverterpublic String getValue()
getValue in interface tech.uom.lib.common.function.ValueSupplier<String>public int compareTo(javax.measure.UnitConverter o)
compareTo in interface Comparable<javax.measure.UnitConverter>Copyright © 2005–2018 Units of Measurement project. All rights reserved.