Package org.assertj.core.util
Class DoubleComparator
- java.lang.Object
-
- org.assertj.core.util.NullSafeComparator<Double>
-
- org.assertj.core.util.DoubleComparator
-
- All Implemented Interfaces:
Comparator<Double>
public class DoubleComparator extends NullSafeComparator<Double>
-
-
Field Summary
Fields Modifier and Type Field Description private double
precision
-
Constructor Summary
Constructors Constructor Description DoubleComparator(double epsilon)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static boolean
closeEnough(Double x, Double y, double epsilon)
protected int
compareNonNull(Double x, Double y)
boolean
equals(Object obj)
double
getEpsilon()
int
hashCode()
String
toString()
-
Methods inherited from class org.assertj.core.util.NullSafeComparator
compare
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Comparator
reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
-
-
-
Method Detail
-
compareNonNull
protected int compareNonNull(Double x, Double y)
- Specified by:
compareNonNull
in classNullSafeComparator<Double>
-
getEpsilon
public double getEpsilon()
-
equals
public boolean equals(Object obj)
- Specified by:
equals
in interfaceComparator<Double>
- Overrides:
equals
in classObject
-
-