public abstract class CompareTo<T extends java.lang.Comparable<T>> extends ArgumentMatcher<T>
Constructor and Description |
---|
CompareTo(java.lang.Comparable<T> value) |
Modifier and Type | Method and 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) |
public CompareTo(java.lang.Comparable<T> value)
public boolean matches(java.lang.Object actual)
ArgumentMatcher
The method should never assert if the argument doesn't match. It should only return false.
public void describeTo(org.hamcrest.Description description)
ArgumentMatcher
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).
describeTo
in interface org.hamcrest.SelfDescribing
describeTo
in class ArgumentMatcher<T extends java.lang.Comparable<T>>
description
- the description to which the matcher description is
appended.protected abstract java.lang.String getName()
protected abstract boolean matchResult(int result)