Package org.assertj.core.util
Class FloatComparator
- All Implemented Interfaces:
Comparator<Float>
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate boolean
closeEnough
(Float x, Float y, float epsilon) int
compareNonNull
(Float x, Float y) boolean
float
int
hashCode()
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
-
Field Details
-
precision
private float precision
-
-
Constructor Details
-
FloatComparator
public FloatComparator(float epsilon)
-
-
Method Details
-
getEpsilon
public float getEpsilon() -
compareNonNull
- Specified by:
compareNonNull
in classNullSafeComparator<Float>
-
closeEnough
-
hashCode
public int hashCode() -
equals
- Specified by:
equals
in interfaceComparator<Float>
- Overrides:
equals
in classObject
-
toString
-