Class EqualsWithDelta

java.lang.Object
org.mockito.internal.matchers.EqualsWithDelta
All Implemented Interfaces:
Serializable, ArgumentMatcher<Number>

public class EqualsWithDelta extends Object implements ArgumentMatcher<Number>, Serializable
See Also:
  • Field Details

    • wanted

      private final Number wanted
    • delta

      private final Number delta
  • Constructor Details

    • EqualsWithDelta

      public EqualsWithDelta(Number value, Number delta)
  • Method Details

    • matches

      public boolean matches(Number actual)
      Description copied from interface: ArgumentMatcher
      Informs if this matcher accepts the given argument.

      The method should never assert if the argument doesn't match. It should only return false.

      See the example in the top level javadoc for ArgumentMatcher

      Specified by:
      matches in interface ArgumentMatcher<Number>
      Parameters:
      actual - the argument
      Returns:
      true if this matcher accepts the given argument.
    • toString

      public String toString()
      Overrides:
      toString in class Object