@Test public void testEventKeyFromMatchKey() { assertEquals(MatchHelper.getEventKeyFromMatchKey("2015cthar_f1m1"), "2015cthar"); assertEquals(MatchHelper.getEventKeyFromMatchKey("2015ctwat_qm41"), "2015ctwat"); assertEquals(MatchHelper.getEventKeyFromMatchKey("2012ct_sf2m3"), "2012ct"); assertEquals(MatchHelper.getEventKeyFromMatchKey("20asdfn_afds"), "20asdfn_afds"); }
public static String getEventKeyFromMatchKey(String matchKey) { if (validateMatchKey(matchKey)) { return matchKey.replaceAll("_.+", ""); } else { return matchKey; } }
MatchHelper { public static String getEventKeyFromMatchKey(String matchKey) { if (validateMatchKey(matchKey)) { return matchKey.replaceAll("_.+", ""); } else { return matchKey; } } }
MatchHelper { public static String getEventKeyFromMatchKey(String matchKey) { if (validateMatchKey(matchKey)) { return matchKey.replaceAll("_.+", ""); } else { return matchKey; } } private  MatchHelper(); }
MatchHelper { public static String getEventKeyFromMatchKey(String matchKey) { if (validateMatchKey(matchKey)) { return matchKey.replaceAll("_.+", ""); } else { return matchKey; } } private  MatchHelper(); static boolean validateMatchKey(String key); static String getEventKeyFromMatchKey(String matchKey); static @Nullable Match getNextMatchPlayed(List<Match> matches); static @Nullable Match getLastMatchPlayed(List<Match> matches); static String getMatchTitleFromMatchKey(Context context, String matchKey); static String getAbbrevMatchTitleFromMatchKey(Context context, String matchKey); }
MatchHelper { public static String getEventKeyFromMatchKey(String matchKey) { if (validateMatchKey(matchKey)) { return matchKey.replaceAll("_.+", ""); } else { return matchKey; } } private  MatchHelper(); static boolean validateMatchKey(String key); static String getEventKeyFromMatchKey(String matchKey); static @Nullable Match getNextMatchPlayed(List<Match> matches); static @Nullable Match getLastMatchPlayed(List<Match> matches); static String getMatchTitleFromMatchKey(Context context, String matchKey); static String getAbbrevMatchTitleFromMatchKey(Context context, String matchKey);  }