@Test public void getLongestCommonSubstringLength() { String uuid = "b50eb6b0-f0a4-11e3-b72e-005056827e52"; assertEquals(uuid.length(), Utils.getLongestCommonSubstringLength("uuid:" + uuid, uuid)); }
public static int getLongestCommonSubstringLength(String s, String t) { Set<String> longestCommonSubstrings = findLongestCommonSubstrings(s, t); if (longestCommonSubstrings.isEmpty()) { return 0; } else { return longestCommonSubstrings.iterator().next().length(); } }
Utils { public static int getLongestCommonSubstringLength(String s, String t) { Set<String> longestCommonSubstrings = findLongestCommonSubstrings(s, t); if (longestCommonSubstrings.isEmpty()) { return 0; } else { return longestCommonSubstrings.iterator().next().length(); } } }
Utils { public static int getLongestCommonSubstringLength(String s, String t) { Set<String> longestCommonSubstrings = findLongestCommonSubstrings(s, t); if (longestCommonSubstrings.isEmpty()) { return 0; } else { return longestCommonSubstrings.iterator().next().length(); } }  }
Utils { public static int getLongestCommonSubstringLength(String s, String t) { Set<String> longestCommonSubstrings = findLongestCommonSubstrings(s, t); if (longestCommonSubstrings.isEmpty()) { return 0; } else { return longestCommonSubstrings.iterator().next().length(); } }  @Deprecated static boolean instanceOf(String type, Object object); static File buildAbsoluteFile(File parentDir, String filePath); static String computeHash(File file); static Set<String> findLongestCommonSubstrings(String s, String t); static int getLongestCommonSubstringLength(String s, String t); static Identifier extractIdentifierFromDcString(String string); static String mergeStrings(List<String> list, Character separator); static String listToString(List list); static void deleteNonemptyDir(File unzippedDir); static void unzip(File zipFile, File outFolder); }
Utils { public static int getLongestCommonSubstringLength(String s, String t) { Set<String> longestCommonSubstrings = findLongestCommonSubstrings(s, t); if (longestCommonSubstrings.isEmpty()) { return 0; } else { return longestCommonSubstrings.iterator().next().length(); } }  @Deprecated static boolean instanceOf(String type, Object object); static File buildAbsoluteFile(File parentDir, String filePath); static String computeHash(File file); static Set<String> findLongestCommonSubstrings(String s, String t); static int getLongestCommonSubstringLength(String s, String t); static Identifier extractIdentifierFromDcString(String string); static String mergeStrings(List<String> list, Character separator); static String listToString(List list); static void deleteNonemptyDir(File unzippedDir); static void unzip(File zipFile, File outFolder);  }