Package org.openjdk.jmc.common.unit
Class DecimalScaleFactor.Unity
- java.lang.Object
-
- org.openjdk.jmc.common.unit.ScaleFactor
-
- org.openjdk.jmc.common.unit.DecimalScaleFactor
-
- org.openjdk.jmc.common.unit.DecimalScaleFactor.Unity
-
- All Implemented Interfaces:
java.lang.Comparable<ScaleFactor>,IScalarAffineTransform
- Enclosing class:
- DecimalScaleFactor
private static class DecimalScaleFactor.Unity extends DecimalScaleFactor
-
-
Field Summary
-
Fields inherited from class org.openjdk.jmc.common.unit.DecimalScaleFactor
powerOf10
-
-
Constructor Summary
Constructors Constructor Description Unity()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ScaleFactorconcat(ScaleFactor innerFactor)Concatenate (that is, multiply) this scale factor withinnerFactor.DecimalScaleFactorinvert()longtargetFloor(long srcNumericalValue)booleantargetOutOfRange(long srcNumericalValue, long maxAbsValue)doubletargetValue(double srcNumericalValue)longtargetValue(long srcNumericalValue)-
Methods inherited from class org.openjdk.jmc.common.unit.DecimalScaleFactor
appendExponentTo, asExponentialStringBuilder, compareTo, equals, get, getEngFloorFactor, getMultiplier, getSciFloorFactor, hashCode, isInteger, isUnity, targetOutOfRange
-
Methods inherited from class org.openjdk.jmc.common.unit.ScaleFactor
concat, getOffset, invertAndConcat, invertAndConcat, targetFloor, targetIntFloor, targetNumber, targetNumber
-
-
-
-
Method Detail
-
concat
public ScaleFactor concat(ScaleFactor innerFactor)
Description copied from class:ScaleFactorConcatenate (that is, multiply) this scale factor withinnerFactor. This is just a special case ofScaleFactor.concat(IScalarAffineTransform).- Overrides:
concatin classDecimalScaleFactor- Returns:
- the combined scale factor
- See Also:
ScaleFactor.concat(IScalarAffineTransform)
-
targetOutOfRange
public boolean targetOutOfRange(long srcNumericalValue, long maxAbsValue)- Specified by:
targetOutOfRangein interfaceIScalarAffineTransform- Overrides:
targetOutOfRangein classDecimalScaleFactor
-
targetValue
public long targetValue(long srcNumericalValue)
- Specified by:
targetValuein interfaceIScalarAffineTransform- Overrides:
targetValuein classDecimalScaleFactor- Parameters:
srcNumericalValue- a numerical quantity value, expressed in the source unit- Returns:
- the corresponding numerical quantity value, when expressed in the target unit,
rounded to the closest integer that can be represented by a
long
-
targetFloor
public long targetFloor(long srcNumericalValue)
- Specified by:
targetFloorin interfaceIScalarAffineTransform- Overrides:
targetFloorin classDecimalScaleFactor- Parameters:
srcNumericalValue- a numerical quantity value, expressed in the source unit- Returns:
- the floor of the corresponding numerical quantity value, when expressed in the target
unit, clamped to a
long
-
targetValue
public double targetValue(double srcNumericalValue)
- Specified by:
targetValuein interfaceIScalarAffineTransform- Overrides:
targetValuein classDecimalScaleFactor- Parameters:
srcNumericalValue- a numerical quantity value, expressed in the source unit- Returns:
- the corresponding numerical quantity value, when expressed in the target unit
-
invert
public DecimalScaleFactor invert()
- Specified by:
invertin interfaceIScalarAffineTransform- Overrides:
invertin classDecimalScaleFactor- Returns:
- the inverse transform
-
-