Class KeyFunctionMatch

  • All Implemented Interfaces:
    Match

    public class KeyFunctionMatch
    extends Object
    implements Match
    A KeyFunctionMatch is a Match which takes two key functions which are used to extract keys from two inputs. A match occurs when the keys are equal. The first key function is applied to the Left input in a Left sided join and vice versa.
    • Constructor Detail

      • KeyFunctionMatch

        public KeyFunctionMatch()
      • KeyFunctionMatch

        public KeyFunctionMatch​(Function firstKeyFunction,
                                Function secondKeyFunction)
    • Method Detail

      • init

        public void init​(Iterable matchCandidates)
        Description copied from interface: Match
        Initialises the match and stores the match candidates.
        Specified by:
        init in interface Match
        Parameters:
        matchCandidates - candidate pool to check for matches
      • getFirstKeyFunction

        public Function getFirstKeyFunction()
      • setFirstKeyFunction

        public void setFirstKeyFunction​(Function firstKeyFunction)
      • getSecondKeyFunction

        public Function getSecondKeyFunction()
      • setSecondKeyFunction

        public void setSecondKeyFunction​(Function secondKeyFunction)
      • matching

        public List matching​(Object testObject)
        Description copied from interface: Match
        Compares a list of Objects against a test Object and returns matched Objects.
        Specified by:
        matching in interface Match
        Parameters:
        testObject - Object to test against.
        Returns:
        List containing matched Objects.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object