Package org.mockito.internal.matchers
Class CompareTo<T extends java.lang.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
public abstract class CompareTo<T extends java.lang.Comparable<T>> extends ArgumentMatcher<T>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
describeTo(org.hamcrest.Description description)
By default this method decamelizes matchers name to promote meaningful names for matchers.protected abstract java.lang.String
getName()
boolean
matches(java.lang.Object actual)
Returns whether this matcher accepts the given argument.protected abstract boolean
matchResult(int result)
-
-
-
Constructor Detail
-
CompareTo
public CompareTo(java.lang.Comparable<T> value)
-
-
Method Detail
-
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.
-
describeTo
public void describeTo(org.hamcrest.Description description)
Description copied from class:ArgumentMatcher
By 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:
describeTo
in interfaceorg.hamcrest.SelfDescribing
- Overrides:
describeTo
in classArgumentMatcher<T extends java.lang.Comparable<T>>
- Parameters:
description
- the description to which the matcher description is appended.
-
getName
protected abstract java.lang.String getName()
-
matchResult
protected abstract boolean matchResult(int result)
-
-