@Test public void normalize_RemoveWhitespaces() { assertEquals("Jan Nowak", PersonNameNormalizer.normalize(" Jan \t Nowak ")); }
public static String normalize(String firstLastName) { Preconditions.checkNotNull(firstLastName); firstLastName = unify(firstLastName); firstLastName = removeNonAlphabetic(firstLastName); firstLastName = StringTools.squashAndTrim(firstLastName); return capitalizeFirstLetters(firstLastName); }
PersonNameNormalizer { public static String normalize(String firstLastName) { Preconditions.checkNotNull(firstLastName); firstLastName = unify(firstLastName); firstLastName = removeNonAlphabetic(firstLastName); firstLastName = StringTools.squashAndTrim(firstLastName); return capitalizeFirstLetters(firstLastName); } }
PersonNameNormalizer { public static String normalize(String firstLastName) { Preconditions.checkNotNull(firstLastName); firstLastName = unify(firstLastName); firstLastName = removeNonAlphabetic(firstLastName); firstLastName = StringTools.squashAndTrim(firstLastName); return capitalizeFirstLetters(firstLastName); } private  PersonNameNormalizer(); }
PersonNameNormalizer { public static String normalize(String firstLastName) { Preconditions.checkNotNull(firstLastName); firstLastName = unify(firstLastName); firstLastName = removeNonAlphabetic(firstLastName); firstLastName = StringTools.squashAndTrim(firstLastName); return capitalizeFirstLetters(firstLastName); } private  PersonNameNormalizer(); static String normalize(String firstLastName); static String unify(String firstLastName); }
PersonNameNormalizer { public static String normalize(String firstLastName) { Preconditions.checkNotNull(firstLastName); firstLastName = unify(firstLastName); firstLastName = removeNonAlphabetic(firstLastName); firstLastName = StringTools.squashAndTrim(firstLastName); return capitalizeFirstLetters(firstLastName); } private  PersonNameNormalizer(); static String normalize(String firstLastName); static String unify(String firstLastName);  }