Class CompareTo<T extends Comparable<T>>

java.lang.Object
org.mockito.internal.matchers.CompareTo<T>
All Implemented Interfaces:
Serializable, ArgumentMatcher<T>
Direct Known Subclasses:
CompareEqual, GreaterOrEqual, GreaterThan, LessOrEqual, LessThan

public abstract class CompareTo<T extends Comparable<T>> extends Object implements ArgumentMatcher<T>, Serializable
See Also:
  • Constructor Details

    • CompareTo

      public CompareTo(T value)
  • Method Details

    • matches

      public final boolean matches(T 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<T extends Comparable<T>>
      Parameters:
      actual - the argument
      Returns:
      true if this matcher accepts the given argument.
    • toString

      public final String toString()
      Overrides:
      toString in class Object
    • getName

      protected abstract String getName()
    • matchResult

      protected abstract boolean matchResult(int result)