Package org.mockito.internal.matchers
Class CompareTo<T extends Comparable<T>>
java.lang.Object
org.hamcrest.BaseMatcher<T>
org.mockito.ArgumentMatcher<T>
org.mockito.internal.matchers.CompareTo<T>
- All Implemented Interfaces:
org.hamcrest.Matcher<T>,org.hamcrest.SelfDescribing
- Direct Known Subclasses:
CompareEqual,GreaterOrEqual,GreaterThan,LessOrEqual,LessThan
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddescribeTo(org.hamcrest.Description description) By default this method decamelizes matchers name to promote meaningful names for matchers.protected abstract StringgetName()booleanReturns whether this matcher accepts the given argument.protected abstract booleanmatchResult(int result) Methods inherited from class org.hamcrest.BaseMatcher
_dont_implement_Matcher___instead_extend_BaseMatcher_, describeMismatch, isNotNull, toString
-
Constructor Details
-
CompareTo
-
-
Method Details
-
matches
Description copied from class:ArgumentMatcherReturns 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:
matchesin interfaceorg.hamcrest.Matcher<T extends Comparable<T>>- Specified by:
matchesin classArgumentMatcher<T extends Comparable<T>>- Parameters:
actual- the argument- Returns:
- whether this matcher accepts the given argument.
-
describeTo
public void describeTo(org.hamcrest.Description description) Description copied from class:ArgumentMatcherBy default this method decamelizes matchers name to promote meaningful names for matchers.For example StringWithStrongLanguage matcher will generate 'String with strong language' description in case of failure.
You might want to override this method to provide more specific description of the matcher (useful when verification failures are reported).
- Specified by:
describeToin interfaceorg.hamcrest.SelfDescribing- Overrides:
describeToin classArgumentMatcher<T extends Comparable<T>>- Parameters:
description- the description to which the matcher description is appended.
-
getName
-
matchResult
protected abstract boolean matchResult(int result)
-