java.lang.Object
com.aquima.interactions.matching.impl.functions.MatchFunction
com.aquima.interactions.matching.impl.functions.trigram.TrigramMatch
All Implemented Interfaces:
IMatchFunction

public final class TrigramMatch extends MatchFunction

Title: TrigramMatch.java

Description:

Copyright: Copyright (c) 2001

Company: Everest b.v.

Since:
6.2
Author:
O. de Groote, O. Kerpershoek
  • Constructor Details

    • TrigramMatch

      public TrigramMatch(String name, int matchType, boolean countMultiples)
      Constructs a trigram match function with the required parameters.
      Parameters:
      name - The name of the match function.
      matchType - The trigram match type as defined in the TrigramConsts class.
      countMultiples - Boolean indicating if duplicate trigrams should be counted.
  • 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.
      Returns:
      an array of data types that are supported by this match function.
    • demandValueFor

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

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

      public int match(IMatchValue vraag, IMatchValue aanbod)
      Description copied from interface: IMatchFunction
      This method should compare the demand value against the supply value and determine the match score.
      Parameters:
      vraag - The value that is demanded.
      aanbod - The value that is supplied.
      Returns:
      The match score for the supply and demand combination.