public class LongScaleFactor extends ScaleFactor
ScaleFactor
implementation to improve custom units.Constructor and Description |
---|
LongScaleFactor(long factor) |
Modifier and Type | Method and Description |
---|---|
ScaleFactor |
concat(ScaleFactor innerFactor)
Concatenate (that is, multiply) this scale factor with
innerFactor . |
boolean |
equals(Object other) |
double |
getMultiplier() |
int |
hashCode() |
ScaleFactor |
invert() |
ScaleFactor |
invertAndConcat(ScaleFactor innerFactor)
Concatenate (that is, multiply) the inverse of this scale factor with
innerFactor . |
boolean |
isInteger() |
boolean |
isUnity() |
long |
targetFloor(long srcNumericalValue) |
Number |
targetNumber(long srcNumericalValue) |
boolean |
targetOutOfRange(double srcNumericalValue,
long maxAbsValue) |
boolean |
targetOutOfRange(long srcNumericalValue,
long maxAbsValue) |
double |
targetValue(double srcNumericalValue) |
long |
targetValue(long srcNumericalValue) |
String |
toString() |
compareTo, concat, getOffset, invertAndConcat, targetFloor, targetIntFloor, targetNumber
public ScaleFactor concat(ScaleFactor innerFactor)
ScaleFactor
innerFactor
. This is just a
special case of ScaleFactor.concat(IScalarAffineTransform)
.concat
in class ScaleFactor
ScaleFactor.concat(IScalarAffineTransform)
public ScaleFactor invertAndConcat(ScaleFactor innerFactor)
ScaleFactor
innerFactor
.
This is just a special case of ScaleFactor.invertAndConcat(IScalarAffineTransform)
.invertAndConcat
in class ScaleFactor
ScaleFactor.invertAndConcat(IScalarAffineTransform)
public ScaleFactor invert()
invert
in interface IScalarAffineTransform
invert
in class ScaleFactor
public boolean targetOutOfRange(double srcNumericalValue, long maxAbsValue)
public double targetValue(double srcNumericalValue)
srcNumericalValue
- a numerical quantity value, expressed in the source unitpublic boolean targetOutOfRange(long srcNumericalValue, long maxAbsValue)
public long targetValue(long srcNumericalValue)
srcNumericalValue
- a numerical quantity value, expressed in the source unitlong
public long targetFloor(long srcNumericalValue)
srcNumericalValue
- a numerical quantity value, expressed in the source unitlong
public Number targetNumber(long srcNumericalValue)
targetNumber
in interface IScalarAffineTransform
targetNumber
in class ScaleFactor
srcNumericalValue
- an exact numerical quantity value, expressed in the source unitLong
if it can exactly be represented in one, otherwise as some other
Number
with at least the precision of double
public boolean isUnity()
public boolean isInteger()
public boolean equals(Object other)
equals
in class ScaleFactor
public int hashCode()
hashCode
in class ScaleFactor
public double getMultiplier()
offset
is added)Copyright © 2020. All rights reserved.