Class DefaultStringNormalizer

  • All Implemented Interfaces:
    java.util.function.Function<java.lang.String,​java.lang.String>

    public class DefaultStringNormalizer
    extends java.lang.Object
    implements java.util.function.Function<java.lang.String,​java.lang.String>
    The default normalizer (works sufficiently for most western languages).
    Author:
    harald
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String apply​(java.lang.String str)
      Normalizes a string (phonetically) for use as PDO.normText.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.function.Function

        andThen, compose
    • Constructor Detail

      • DefaultStringNormalizer

        public DefaultStringNormalizer​(char fieldSeparator)
        Creates a normalizer.
        Parameters:
        fieldSeparator - separator between text fields, 0 if none
      • DefaultStringNormalizer

        public DefaultStringNormalizer()
        Creates normalizer.
        With a comma as the field separator.
    • Method Detail

      • apply

        public java.lang.String apply​(java.lang.String str)
        Normalizes a string (phonetically) for use as PDO.normText.
        Specified by:
        apply in interface java.util.function.Function<java.lang.String,​java.lang.String>
        Parameters:
        str - the string to be normalized
        Returns:
        the normalized string