StringUtils { public static final String compact(String name) { Set<String> parts = new LinkedHashSet<String>(); for (String part : name.split(SPLITTER_REGEX)) { parts.add(part); } return join(parts,""); } private  StringUtils(); static boolean isNullOrEmpty(String str); static int indexOfAlphabetic(String str); static String capitalizeFirst(String str); static String deCapitalizeFirst(String str); static String join(Iterable<T> items, String delimiter); static String join(Iterable<T> items, Function<T, String> function, String delimiter); static String join(T[] items, String delimiter); static String join(T[] items, Function<T, String> function, String delimiter); static String getPrefix(Iterable<T> items, Function<T, String> function); static String getPrefix(Iterable<String> items); static final String loadResourceQuietly(String resourceName); static String loadResource(String resourceName); static final String loadResourceQuietly(URL resourceUrl); static String loadResource(URL resourceUrl); static final String compact(String name); static final String prefixKeywords(String name); static final String toFieldName(String name); static final String toPojoName(String name, String prefix, String suffix);  }
@Test public void testCompact() throws Exception { assertEquals("withDefaultContact", compact("withDefaultContactContact")); }