Module org.refcodes.matcher
Package org.refcodes.matcher
Class LessOrEqualThanMatcher<M extends Comparable<M>>
java.lang.Object
org.refcodes.matcher.AbstractMatcher<M>
org.refcodes.matcher.AbstractMatcheeMatcher<M>
org.refcodes.matcher.LessOrEqualThanMatcher<M>
- Type Parameters:
M
- The matchee type, which must implement theComparable
interface for being able to do the according comparisons required by thisMatcher
.
- All Implemented Interfaces:
Matchable<M>
,Matcher<M>
,org.refcodes.mixin.Schemable<MatcherSchema>
public class LessOrEqualThanMatcher<M extends Comparable<M>>
extends AbstractMatcheeMatcher<M>
implements Matcher<M>
A LESS OR EQUAL THAN
Matcher
, comparing its matchee with the matchee
provided to the Matchable.isMatching(Object)
method using the
Comparable.compareTo(Object)
method to be implemented by the
matchees.-
Field Summary
Fields inherited from class org.refcodes.matcher.AbstractMatcher
MATCHEE
-
Constructor Summary
ConstructorDescriptionLessOrEqualThanMatcher
(M aMatchee) Constructs an LESS OR EQUAL THANMatcher
, comparing its matchee with the matchee provided to theMatchable.isMatching(Object)
method using theComparable.compareTo(Object)
method to be implemented by the matchees. -
Method Summary
Modifier and TypeMethodDescriptionboolean
isMatching
(M aMatchee) Tests whether the given event is matching the mathcer's criteria.Methods inherited from class org.refcodes.matcher.AbstractMatcheeMatcher
toSchema
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.refcodes.mixin.Schemable
toSchema
-
Constructor Details
-
LessOrEqualThanMatcher
Constructs an LESS OR EQUAL THANMatcher
, comparing its matchee with the matchee provided to theMatchable.isMatching(Object)
method using theComparable.compareTo(Object)
method to be implemented by the matchees.- Parameters:
aMatchee
- The matchee with which to match.
-
-
Method Details
-
isMatching
Tests whether the given event is matching the mathcer's criteria.- Specified by:
isMatching
in interfaceMatchable<M extends Comparable<M>>
- Parameters:
aMatchee
- The matchee used for testing matchability.- Returns:
- True in case the matchee matches the matcher's criteria, else false.
-