Module org.refcodes.matcher
Package org.refcodes.matcher
package org.refcodes.matcher
This artifact allows the construction of matchers for building arbitrary
complex matching functionality. It is used to test whether matchee instances
match certain criteria.
Matcher instances may
get nested in a hierarchy (using e.g. the
OrMatcher, the
AndMatcher or the
NotMatcher types), having different matchers in
combination will do custom matching. Some examples for
Matcher implementations are the
EqualWithMatcher, the
PathMatcher,the
LessThanMatcher or the
RegExpMatcher. Use the
MatcherSugar syntactic sugar mixin for
expressively building your matchers.
Please refer to the refcodes-matcher: Build custom matching logic and match path patterns documentation for an up-to-date and detailed description on the usage of this artifact.
-
ClassDescriptionThe
AbstractMatcheeMatcheris composed of multipleMatcherinstances queried upon match requests as ofMatchable.isMatching(Object).TheAbstractMatcherprovides a base functionality forMatcherimplementations.TheAbstractMatcherCompositeis composed of multipleMatcherinstances queried upon match requests as ofMatchable.isMatching(Object).TheAbstractWildcardMatcherprovides a base functionality forMatcherimplementations.The Class WildcardMatcherSubstitutes.AndMatcher<M>AnyMatcher<M>An ANY implementation of aMatcherwhich always returnstrue.An EQUAL WITHMatcher, comparing its matchee with the matchee provided to theEqualWithMatcher.isMatching(Object)method for equality.GreaterOrEqualThanMatcher<M extends Comparable<M>>A GREATER 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.GreaterThanMatcher<M extends Comparable<M>>A GREATER THANMatcher, comparing its matchee with the matchee provided to theMatchable.isMatching(Object)method using theComparable.compareTo(Object)method to be implemented by the matchees.A IS ASSIGNABLE FROM implementation of aMatcherby type.LessOrEqualThanMatcher<M extends Comparable<M>>A 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.LessThanMatcher<M extends Comparable<M>>A LESS THANMatcher, comparing its matchee with the matchee provided to theMatchable.isMatching(Object)method using theComparable.compareTo(Object)method to be implemented by the matchees.Matchable<M>Matcher<M>The matcher is used to test whether a matchee matches certain criteria.The purpose of aMatcherSchemais automatically generate documentation ofMatcherstructures.Declarative syntactic sugar which may be statically imported in order to allow declarative definitions for theMatcherelements.NoneMatcher<M>A NONE implementation of aMatcherwhich always returnsfalse.A NOT EQUAL WITHMatcher, comparing its matchee with the matchee provided to theNotEqualWithMatcher.isMatching(Object)method for equality.NotMatcher<M>OrMatcher<M>ThePathMatcherprovidesWildcardMatcherfunctionality for matching paths: ThePathMatchermatches its ANT like path pattern against the path provided to thePathMatcher.isMatching(String)and the like methods.The REGEXPRegExpMatcherprovidesWildcardMatcherfunctionality for regular expressionPatternmatching.AWildcardMatcheris aMatcherproviding additional means to work with the wildcards and their wildcard substitutes in case of a match as ofMatchable.isMatching(Object).