|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsbrt.kernel.math.DoubleEquiv
public class DoubleEquiv
This class is used to compare double precision numbers for equivalence.
Constructor Summary | |
---|---|
DoubleEquiv(double tolerance)
Creates a new double precision number equivalence tester with the provided tolerance. |
Method Summary | |
---|---|
boolean |
areEquiv(double value1,
double value2)
Indicates if the provided values are equivalent. |
boolean |
areEquiv(java.lang.Double value1,
java.lang.Double value2)
Indicates if the provided values are equivalent. |
double |
getTolerance()
Returns the tolerance used by this equivalence tester. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DoubleEquiv(double tolerance)
tolerance
- the maximum amount by which two doubles can differ, but
still be considered equivalent.Method Detail |
---|
public double getTolerance()
public boolean areEquiv(java.lang.Double value1, java.lang.Double value2)
areEquiv
in interface EquivTester<java.lang.Double>
value1
- a value.value2
- a value.
true
if the provided values are equivalent,
false
otherwise.public boolean areEquiv(double value1, double value2)
value1
- a value.value2
- a value.
true
if the provided values are equivalent,
false
otherwise.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |