Interface AbstractFuzzyMatcher<T>

All Known Implementing Classes:
AbstractFuzzyMember, FuzzyClassContract, FuzzyFieldContract, FuzzyMethodContract
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface AbstractFuzzyMatcher<T>
Represents a matcher for fields, methods, constructors and classes.

This class should ideally never expose mutable state. Its round number must be immutable.

  • Method Details

    • isMatch

      boolean isMatch(T value, Object parent)
      Determine if the given value is a match.
      Parameters:
      value - - the value to match.
      parent - - the parent container, or NULL if this value is the root.
      Returns:
      TRUE if it is a match, FALSE otherwise.
    • inverted

      default AbstractFuzzyMatcher<T> inverted()
      Create a fuzzy matcher that returns the opposite result of the current matcher.
      Returns:
      An inverted fuzzy matcher.
    • and

      Require that this and the given matcher be TRUE.
      Parameters:
      other - - the other fuzzy matcher.
      Returns:
      A combined fuzzy matcher.
    • or

      Require that either this or the other given matcher be TRUE.
      Parameters:
      other - - the other fuzzy matcher.
      Returns:
      A combined fuzzy matcher.