public static final class AbstractConverter.Pair extends AbstractConverter implements Serializable
[pair] = [left] x [right]).AbstractConverter.PairconversionSteps, IDENTITY| Constructor and Description |
|---|
Pair(javax.measure.UnitConverter left,
javax.measure.UnitConverter right)
Creates a pair converter resulting from the combined transformation of the
specified converters.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(javax.measure.UnitConverter obj) |
BigDecimal |
convertWhenNotIdentity(BigDecimal value,
MathContext ctx)
Non-API
|
Number |
convertWhenNotIdentity(BigInteger value,
MathContext ctx)
Non-API
|
double |
convertWhenNotIdentity(double value)
Non-API
|
protected List<? extends javax.measure.UnitConverter> |
createConversionSteps() |
boolean |
equals(Object obj) |
javax.measure.UnitConverter |
getLeft() |
javax.measure.UnitConverter |
getRight() |
int |
hashCode() |
AbstractConverter.Pair |
inverseWhenNotIdentity()
Non-API
|
boolean |
isIdentity() |
boolean |
isLinear() |
protected boolean |
isSimpleCompositionWith(AbstractConverter that)
Non-API
Guard for
AbstractConverter.simpleCompose(AbstractConverter) |
protected String |
transformationLiteral()
Non-API
|
concatenate, convert, convert, getConversionSteps, inverse, of, simpleCompose, toStringpublic Pair(javax.measure.UnitConverter left, javax.measure.UnitConverter right)
left - the left converter, not null.right - the right converter.IllegalArgumentException - if either the left or right converter are nullpublic boolean isLinear()
isLinear in interface javax.measure.UnitConverterpublic boolean isIdentity()
isIdentity in interface javax.measure.UnitConverterprotected List<? extends javax.measure.UnitConverter> createConversionSteps()
public AbstractConverter.Pair 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 double convertWhenNotIdentity(double value)
AbstractConverterconvertWhenNotIdentity in class AbstractConverterpublic Number convertWhenNotIdentity(BigInteger value, MathContext ctx)
AbstractConverterconvertWhenNotIdentity in class AbstractConverterpublic BigDecimal convertWhenNotIdentity(BigDecimal value, MathContext ctx)
AbstractConverterconvertWhenNotIdentity in class AbstractConverterpublic boolean equals(Object obj)
equals in class AbstractConverterpublic int hashCode()
hashCode in class AbstractConverterpublic javax.measure.UnitConverter getLeft()
public javax.measure.UnitConverter getRight()
public int compareTo(javax.measure.UnitConverter obj)
compareTo in interface Comparable<javax.measure.UnitConverter>protected 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 AbstractConverterprotected boolean isSimpleCompositionWith(AbstractConverter that)
AbstractConverterAbstractConverter.simpleCompose(AbstractConverter)isSimpleCompositionWith in class AbstractConverterCopyright © 2005–2018 Units of Measurement project. All rights reserved.