Module org.refcodes.matcher
Package org.refcodes.matcher
Class LessOrEqualThanMatcherImpl<M extends Comparable<M>>
- java.lang.Object
-
- org.refcodes.matcher.LessOrEqualThanMatcherImpl<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:
Matcher<M>
public class LessOrEqualThanMatcherImpl<M extends Comparable<M>> extends Object implements Matcher<M>
A LESS OR EQUAL THANMatcher
, comparing its matchee with the matchee provided to theMatcher.isMatching(Object)
method using theComparable.compareTo(Object)
method to be implemented by the matchees.
-
-
Constructor Summary
Constructors Constructor Description LessOrEqualThanMatcherImpl(M aMatchee)
Constructs an LESS OR EQUAL THANMatcher
, comparing its matchee with the matchee provided to theMatcher.isMatching(Object)
method using theComparable.compareTo(Object)
method to be implemented by the matchees.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isMatching(M aMatchee)
Tests whether the given event is matching the mathcer's criteria.
-
-
-
Constructor Detail
-
LessOrEqualThanMatcherImpl
public LessOrEqualThanMatcherImpl(M aMatchee)
Constructs an LESS OR EQUAL THANMatcher
, comparing its matchee with the matchee provided to theMatcher.isMatching(Object)
method using theComparable.compareTo(Object)
method to be implemented by the matchees.- Parameters:
aMatchee
- The matchee with which to match.
-
-
Method Detail
-
isMatching
public boolean isMatching(M aMatchee)
Tests whether the given event is matching the mathcer's criteria.- Specified by:
isMatching
in interfaceMatcher<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.
-
-