Class NumericEqualityMatcher
java.lang.Object
mockit.internal.expectations.argumentMatching.NumericEqualityMatcher
- All Implemented Interfaces:
ArgumentMatcher<NumericEqualityMatcher>
public final class NumericEqualityMatcher
extends Object
implements ArgumentMatcher<NumericEqualityMatcher>
Matches a decimal argument against another within a given margin of error.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Evaluates the matcher for the given argument.boolean
same
(NumericEqualityMatcher other) Indicates whether this matcher instance is functionally the same as another one of the same type.void
writeMismatchPhrase
(ArgumentMismatch argumentMismatch) Writes a phrase to be part of an error message describing an argument mismatch.
-
Constructor Details
-
NumericEqualityMatcher
public NumericEqualityMatcher(double value, double delta)
-
-
Method Details
-
same
Description copied from interface:ArgumentMatcher
Indicates whether this matcher instance is functionally the same as another one of the same type.- Specified by:
same
in interfaceArgumentMatcher<NumericEqualityMatcher>
-
matches
Description copied from interface:ArgumentMatcher
Evaluates the matcher for the given argument.- Specified by:
matches
in interfaceArgumentMatcher<NumericEqualityMatcher>
-
writeMismatchPhrase
Description copied from interface:ArgumentMatcher
Writes a phrase to be part of an error message describing an argument mismatch.- Specified by:
writeMismatchPhrase
in interfaceArgumentMatcher<NumericEqualityMatcher>
-