Package org.openjdk.jmc.common.unit
Class DecimalScaleFactor.DownSmall
- java.lang.Object
-
- org.openjdk.jmc.common.unit.ScaleFactor
-
- org.openjdk.jmc.common.unit.DecimalScaleFactor
-
- org.openjdk.jmc.common.unit.DecimalScaleFactor.DownSmall
-
- All Implemented Interfaces:
java.lang.Comparable<ScaleFactor>
,IScalarAffineTransform
- Enclosing class:
- DecimalScaleFactor
private static class DecimalScaleFactor.DownSmall extends DecimalScaleFactor
-
-
Field Summary
Fields Modifier and Type Field Description private long
longDivisor
-
Fields inherited from class org.openjdk.jmc.common.unit.DecimalScaleFactor
powerOf10
-
-
Constructor Summary
Constructors Constructor Description DownSmall(int powerOf10, long divisor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
targetFloor(long srcNumericalValue)
boolean
targetOutOfRange(long srcNumericalValue, long maxAbsValue)
long
targetValue(long srcNumericalValue)
-
Methods inherited from class org.openjdk.jmc.common.unit.DecimalScaleFactor
appendExponentTo, asExponentialStringBuilder, compareTo, concat, equals, get, getEngFloorFactor, getMultiplier, getSciFloorFactor, hashCode, invert, isInteger, isUnity, targetOutOfRange, targetValue
-
Methods inherited from class org.openjdk.jmc.common.unit.ScaleFactor
concat, getOffset, invertAndConcat, invertAndConcat, targetFloor, targetIntFloor, targetNumber, targetNumber
-
-
-
-
Method Detail
-
targetOutOfRange
public boolean targetOutOfRange(long srcNumericalValue, long maxAbsValue)
- Specified by:
targetOutOfRange
in interfaceIScalarAffineTransform
- Overrides:
targetOutOfRange
in classDecimalScaleFactor
-
targetValue
public long targetValue(long srcNumericalValue)
- Specified by:
targetValue
in interfaceIScalarAffineTransform
- Overrides:
targetValue
in 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:
targetFloor
in interfaceIScalarAffineTransform
- Overrides:
targetFloor
in 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
-
-