Package org.mockito.internal.matchers
Class CompareTo<T extends java.lang.Comparable<T>>
- java.lang.Object
-
- org.mockito.internal.matchers.CompareTo<T>
-
- All Implemented Interfaces:
java.io.Serializable
,ArgumentMatcher<T>
- Direct Known Subclasses:
CompareEqual
,GreaterOrEqual
,GreaterThan
,LessOrEqual
,LessThan
public abstract class CompareTo<T extends java.lang.Comparable<T>> extends java.lang.Object implements ArgumentMatcher<T>, java.io.Serializable
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract java.lang.String
getName()
boolean
matches(T actual)
Informs if this matcher accepts the given argument.protected abstract boolean
matchResult(int result)
java.lang.String
toString()
-
-
-
Constructor Detail
-
CompareTo
public CompareTo(T value)
-
-
Method Detail
-
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 interfaceArgumentMatcher<T extends java.lang.Comparable<T>>
- Parameters:
actual
- the argument- Returns:
- true if this matcher accepts the given argument.
-
toString
public final java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getName
protected abstract java.lang.String getName()
-
matchResult
protected abstract boolean matchResult(int result)
-
-