Class MultiValueMatcher

java.lang.Object
com.aquima.interactions.matching.impl.model.MultiValueMatcher
All Implemented Interfaces:
IMatchFunction
Direct Known Subclasses:
IntersectionMatcher, MaximumMatcher, UniqueMatcher

public abstract class MultiValueMatcher extends Object implements IMatchFunction
Base class for multivalue matchers.
Since:
6.2
Author:
O. Kerpershoek
  • Constructor Details

    • MultiValueMatcher

      protected MultiValueMatcher(IMatchFunction matcher)
  • Method Details

    • getSupportedTypes

      public DataType[] getSupportedTypes()
      Description copied from interface: IMatchFunction
      This method returns an array of data types that are supported by this match function.
      Specified by:
      getSupportedTypes in interface IMatchFunction
      Returns:
      an array of data types that are supported by this match function.
    • getMatchFunction

      protected final IMatchFunction getMatchFunction()
    • onStartup

      public void onStartup()
      Description copied from interface: IMatchFunction
      This method is invoked by the casebase before the cases are initialized.
      Specified by:
      onStartup in interface IMatchFunction
    • onLoadComplete

      public void onLoadComplete()
      Description copied from interface: IMatchFunction
      This method is invoked by the casebase after all the cases have been initialized. The onLoadComplete method may be used to optimize or adjust weight values based on the distribution of the case values.
      Specified by:
      onLoadComplete in interface IMatchFunction
    • demandValueFor

      public final IMatchValue demandValueFor(IValue obj)
      Description copied from interface: IMatchFunction
      This method is invoked to convert a value object to a matchable demand value.
      Specified by:
      demandValueFor in interface IMatchFunction
      Parameters:
      obj - The value object that should be converted.
      Returns:
      The demand value for the object value.
    • supplyValueFor

      public final IMatchValue supplyValueFor(IValue obj)
      Description copied from interface: IMatchFunction
      This method is invoked to convert a value object to a matchable supply value.
      Specified by:
      supplyValueFor in interface IMatchFunction
      Parameters:
      obj - The value object that should be converted.
      Returns:
      The supply value for the object value.
    • match

      public final int match(IMatchVisitor visitor, IMatchValue demand, IMatchValue supply)
      Description copied from interface: IMatchFunction
      This method should compare the demand value against the supply value and determine the match score.
      Specified by:
      match in interface IMatchFunction
      Parameters:
      visitor - The visitor that should be notified of the match events.
      demand - The value that is demanded.
      supply - The value that is supplied.
      Returns:
      The match score for the supply and demand combination.
    • getName

      public String getName()
      Description copied from interface: IMatchFunction
      This method returns the unique match function name.
      Specified by:
      getName in interface IMatchFunction
      Returns:
      the unique match function name.
    • getMatchType

      public String getMatchType()
      Description copied from interface: IMatchFunction
      This method returns the type of the match function.
      Specified by:
      getMatchType in interface IMatchFunction
      Returns:
      the type of the match function.