public final class PowerOfIntConverter extends AbstractConverter implements MultiplyConverter, tech.uom.lib.common.function.IntBaseSupplier, tech.uom.lib.common.function.IntExponentSupplier
AbstractConverter.PairconversionSteps, IDENTITY, UNIT_COMPOSITION_HANDLER| Modifier | Constructor and Description |
|---|---|
protected |
PowerOfIntConverter(int base,
int exponent) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
canReduceWith(AbstractConverter that)
Non-API
Guard for
AbstractConverter.reduce(AbstractConverter) |
int |
compareTo(javax.measure.UnitConverter o) |
protected Number |
convertWhenNotIdentity(Number value)
Non-API
|
boolean |
equals(Object obj) |
double |
getAsDouble() |
int |
getBase() |
int |
getExponent() |
Number |
getValue() |
int |
hashCode() |
AbstractConverter |
inverseWhenNotIdentity()
Non-API
Returns an AbstractConverter that represents the inverse transformation of this converter,
for cases where the transformation is not the identity transformation.
|
boolean |
isIdentity() |
protected AbstractConverter |
reduce(AbstractConverter that)
Non-API
Guarded by
AbstractConverter.canReduceWith(AbstractConverter) |
RationalConverter |
toRationalConverter() |
String |
transformationLiteral()
Non-API
Returns a String describing the transformation that is represented by this converter.
|
concatenate, convert, convert, getConversionSteps, inverse, linearFactor, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetFactor, identity, isLinear, of, of, ofExponent, ofPiExponent, ofPrefix, ofRational, ofRational, ofRational, ofTenExponentprotected PowerOfIntConverter(int base, int 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.UnitConverterprotected boolean canReduceWith(AbstractConverter that)
AbstractConverterAbstractConverter.reduce(AbstractConverter)canReduceWith in class AbstractConverterthat is possible, such
that no additional conversion steps are required, with respect to the steps already
in place by this converterprotected AbstractConverter reduce(AbstractConverter that)
AbstractConverterAbstractConverter.canReduceWith(AbstractConverter)reduce 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(Number 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 Number getValue()
getValue in interface tech.uom.lib.common.function.ValueSupplier<Number>public double getAsDouble()
getAsDouble in interface DoubleSupplierpublic int compareTo(javax.measure.UnitConverter o)
compareTo in interface Comparable<javax.measure.UnitConverter>public int hashCode()
hashCode in class AbstractConverterpublic RationalConverter toRationalConverter()
Copyright © 2005–2022 Units of Measurement project. All rights reserved.