Class LessThanMatcher<M extends Comparable<M>>

Type Parameters:
M - The matchee type, which must implement the Comparable interface for being able to do the according comparisons required by this Matcher.
All Implemented Interfaces:
Matchable<M>, Matcher<M>, org.refcodes.mixin.AliasAccessor, org.refcodes.mixin.Schemable

public class LessThanMatcher<M extends Comparable<M>> extends AbstractMatcheeMatcher<M> implements Matcher<M>
A LESS 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.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.refcodes.mixin.AliasAccessor

    org.refcodes.mixin.AliasAccessor.AliasBuilder<B extends org.refcodes.mixin.AliasAccessor.AliasBuilder<B>>, org.refcodes.mixin.AliasAccessor.AliasMutator, org.refcodes.mixin.AliasAccessor.AliasProperty
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     

    Fields inherited from class org.refcodes.matcher.AbstractMatcheeMatcher

    _matchee
  • Constructor Summary

    Constructors
    Constructor
    Description
    LessThanMatcher(M aMatchee)
    Constructs an LESS 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.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    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 org.refcodes.matcher.AbstractMatcher

    getAlias

    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.AliasAccessor

    getAlias

    Methods inherited from interface org.refcodes.matcher.Matcher

    toSchema
  • Field Details

  • Constructor Details

  • Method Details

    • isMatching

      public boolean isMatching(M aMatchee)
      Tests whether the given event is matching the mathcer's criteria.
      Specified by:
      isMatching in interface Matchable<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.