Class MatchRatingApproachEncoder

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object encode​(java.lang.Object pObject)
      Encodes an Object using the Match Rating Approach algorithm.
      java.lang.String encode​(java.lang.String name)
      Encodes a String using the Match Rating Approach (MRA) algorithm.
      boolean isEncodeEquals​(java.lang.String name1, java.lang.String name2)
      Determines if two names are homophonous via Match Rating Approach (MRA) algorithm.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MatchRatingApproachEncoder

        public MatchRatingApproachEncoder()
    • Method Detail

      • encode

        public final java.lang.Object encode​(java.lang.Object pObject)
                                      throws EncoderException
        Encodes an Object using the Match Rating Approach algorithm. Method is here to satisfy the requirements of the Encoder interface Throws an EncoderException if input object is not of type java.lang.String.
        Specified by:
        encode in interface Encoder
        Parameters:
        pObject - Object to encode
        Returns:
        An object (or type java.lang.String) containing the Match Rating Approach code which corresponds to the String supplied.
        Throws:
        EncoderException - if the parameter supplied is not of type java.lang.String
      • encode

        public final java.lang.String encode​(java.lang.String name)
        Encodes a String using the Match Rating Approach (MRA) algorithm.
        Specified by:
        encode in interface StringEncoder
        Parameters:
        name - String object to encode
        Returns:
        The MRA code corresponding to the String supplied
      • isEncodeEquals

        public boolean isEncodeEquals​(java.lang.String name1,
                                      java.lang.String name2)
        Determines if two names are homophonous via Match Rating Approach (MRA) algorithm. It should be noted that the strings are cleaned in the same way as encode(String).
        Parameters:
        name1 - First of the 2 strings (names) to compare
        name2 - Second of the 2 names to compare
        Returns:
        true if the encodings are identical false otherwise.