public final class PowerOfIntConverter extends AbstractConverter implements tech.uom.lib.common.function.IntBaseSupplier, tech.uom.lib.common.function.IntExponentSupplier
AbstractConverter.PairconversionSteps, IDENTITY| Modifier | Constructor and Description |
|---|---|
protected |
PowerOfIntConverter(int base,
int exponent) |
concatenate, convert, convert, getConversionSteps, inverse, toStringprotected PowerOfIntConverter(int base, int exponent)
public static PowerOfIntConverter of(javax.measure.Prefix prefix)
prefix - the prefix for the factor.public static PowerOfIntConverter of(int base, int exponent)
base - exponent - public int getBase()
getBase in interface tech.uom.lib.common.function.IntBaseSupplierpublic int getExponent()
getExponent in interface tech.uom.lib.common.function.IntExponentSupplierpublic boolean isIdentity()
isIdentity in interface javax.measure.UnitConverterpublic boolean isLinear()
isLinear 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 AbstractConverterprotected Number convertWhenNotIdentity(BigInteger value, MathContext ctx)
AbstractConverterconvertWhenNotIdentity in class AbstractConverterpublic BigDecimal convertWhenNotIdentity(BigDecimal value, MathContext ctx) throws ArithmeticException
AbstractConverterconvertWhenNotIdentity in class AbstractConverterArithmeticExceptionpublic double convertWhenNotIdentity(double value)
AbstractConverterconvertWhenNotIdentity in class AbstractConverterpublic boolean equals(Object obj)
equals 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 int compareTo(javax.measure.UnitConverter o)
compareTo in interface Comparable<javax.measure.UnitConverter>public int hashCode()
hashCode in class AbstractConverterpublic RationalConverter toRationalConverter()
Copyright © 2005–2018 Units of Measurement project. All rights reserved.