org.mockito.internal.matchers
Class Compare<T>

java.lang.Object
  extended by org.hamcrest.BaseMatcher<T>
      extended by org.mockito.ArgumentMatcher
          extended by org.mockito.internal.matchers.Compare<T>
All Implemented Interfaces:
org.hamcrest.Matcher, org.hamcrest.SelfDescribing

public class Compare<T>
extends ArgumentMatcher


Constructor Summary
Compare(T wanted, java.util.Comparator<T> comparator, LogicalOperator result)
           
 
Method Summary
 void describeTo(org.hamcrest.Description description)
           
 boolean matches(java.lang.Object actual)
          Returns whether this matcher accepts the given argument.
 
Methods inherited from class org.hamcrest.BaseMatcher
_dont_implement_Matcher___instead_extend_BaseMatcher_, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Compare

public Compare(T wanted,
               java.util.Comparator<T> comparator,
               LogicalOperator result)
Method Detail

describeTo

public void describeTo(org.hamcrest.Description description)
Specified by:
describeTo in interface org.hamcrest.SelfDescribing
Overrides:
describeTo in class ArgumentMatcher

matches

public boolean matches(java.lang.Object actual)
Description copied from class: ArgumentMatcher
Returns whether this matcher accepts the given argument.

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

Specified by:
matches in interface org.hamcrest.Matcher
Specified by:
matches in class ArgumentMatcher
Parameters:
actual - the argument
Returns:
whether this matcher accepts the given argument.