|
JADE v6.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.units.Converter
javax.units.LogConverter
This class represents a logarithmic converter. Such converter is typically used to create logarithmic unit. For example:
Unit BEL = TransformedUnit.getInstance( Unit.ONE, new LogConverter(10).inverse());
Instances of this class are immutable.
Field Summary |
Fields inherited from class javax.units.Converter |
IDENTITY |
Constructor Summary | |
LogConverter(double base)
Creates a logarithmic converter having the specified base. |
Method Summary | |
double |
convert(double x)
Converts a double value. |
double |
derivative(double x)
Returns this converter derivative for the specified x value. |
boolean |
equals(java.lang.Object obj)
Indicates whether some other object is "equal to" this converter. |
double |
getBase()
Returns the logarithmic base of this converter. |
int |
hashCode()
Returns a hash code value for this converter. |
Converter |
inverse()
Returns the inverse of this converter. |
boolean |
isLinear()
Indicates if this converter is linear. |
Methods inherited from class javax.units.Converter |
concatenate |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public LogConverter(double base)
base
- the logarithmic base (e.g. Math.E
for
the Natural Logarithm).Method Detail |
public double getBase()
Math.E
for
the Natural Logarithm).public Converter inverse()
Converter
x
is a valid
value, then x == inverse().convert(convert(x))
to within
the accuracy of computer arithmetic.
inverse
in class Converter
public double convert(double x)
Converter
convert
in class Converter
x
- the numeric value to convert.
public double derivative(double x)
Converter
x
value. For linear converters, this method returns
a constant (the linear factor) for all x
values.
derivative
in class Converter
x
- the value for which the derivative is calculated.
public boolean isLinear()
Converter
convert(u + v) == convert(u) + convert(v)
and
convert(r * u) == r * convert(u)
.
isLinear
in class Converter
true
if this converter is linear;
false
otherwise.public boolean equals(java.lang.Object obj)
Converter
equals
in class Converter
obj
- the reference object with which to compare.
true
if this object is a linear converter and this
object is also a linear converter and both have same
derivatives; false
otherwise.public int hashCode()
Converter
hashCode
in class Converter
Converter.equals(java.lang.Object)
|
JADE v6.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |