Package org.fest.assertions.internal
Class Floats
- java.lang.Object
 - 
- org.fest.assertions.internal.Comparables
 - 
- org.fest.assertions.internal.Numbers<NUMBER>
 - 
- org.fest.assertions.internal.RealNumbers<java.lang.Float>
 - 
- org.fest.assertions.internal.Floats
 
 
 
 
 
- 
public class Floats extends RealNumbers<java.lang.Float>
Reusable assertions fors.Float- Author:
 - Alex Ruiz, Joel Costigliola
 
 
- 
- 
Constructor Summary
Constructors Constructor Description Floats(ComparisonStrategy comparisonStrategy) 
- 
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidassertEqual(AssertionInfo info, java.lang.Float actual, java.lang.Float expected, Offset<java.lang.Float> offset)Verifies that two floats are equal within a positive offset.
It does not rely on the custom comparisonStrategy (if one is set) because using an offset is already a specific comparison strategy.static Floatsinstance()Returns the singleton instance of this class based onStandardComparisonStrategy.protected booleanisEqualTo(java.lang.Float actual, java.lang.Float expected, Offset<?> offset)Returns true if the two floats parameter are equal within a positive offset, false otherwise.
It does not rely on the custom comparisonStrategy (if one is set) because using an offset is already a specific comparison strategy.protected java.lang.FloatNaN()protected java.lang.Floatzero()- 
Methods inherited from class org.fest.assertions.internal.RealNumbers
assertIsNaN, assertIsNotNaN 
- 
Methods inherited from class org.fest.assertions.internal.Numbers
assertIsNegative, assertIsNotNegative, assertIsNotPositive, assertIsNotZero, assertIsPositive, assertIsZero 
- 
Methods inherited from class org.fest.assertions.internal.Comparables
areEqual, assertEqual, assertEqualByComparison, assertGreaterThan, assertGreaterThanOrEqualTo, assertLessThan, assertLessThanOrEqualTo, assertNotEqual, assertNotEqualByComparison, assertNotNull, getComparator 
 - 
 
 - 
 
- 
- 
Constructor Detail
- 
Floats
public Floats(ComparisonStrategy comparisonStrategy)
 
 - 
 
- 
Method Detail
- 
instance
public static Floats instance()
Returns the singleton instance of this class based onStandardComparisonStrategy.- Returns:
 - the singleton instance of this class based on 
StandardComparisonStrategy. 
 
- 
NaN
protected java.lang.Float NaN()
- Specified by:
 NaNin classRealNumbers<java.lang.Float>
 
- 
isEqualTo
protected boolean isEqualTo(java.lang.Float actual, java.lang.Float expected, Offset<?> offset)Description copied from class:RealNumbersReturns true if the two floats parameter are equal within a positive offset, false otherwise.
It does not rely on the custom comparisonStrategy (if one is set) because using an offset is already a specific comparison strategy.- Specified by:
 isEqualToin classRealNumbers<java.lang.Float>- Parameters:
 actual- the actual value.expected- the expected value.offset- the given positive offset.- Returns:
 - true if the two floats parameter are equal within a positive offset, false otherwise.
 
 
- 
assertEqual
public void assertEqual(AssertionInfo info, java.lang.Float actual, java.lang.Float expected, Offset<java.lang.Float> offset)
Verifies that two floats are equal within a positive offset.
It does not rely on the custom comparisonStrategy (if one is set) because using an offset is already a specific comparison strategy.- Parameters:
 info- contains information about the assertion.actual- the actual value.expected- the expected value.offset- the given positive offset.- Throws:
 java.lang.NullPointerException- if the given offset isnull.java.lang.AssertionError- if the actual value is not equal to the expected one.
 
 - 
 
 -