@Test public void testValidateMultiTeamKey() { String[] validKeys = new String[]{"frc1124b", "frc254A"}; String[] invalidKeys = new String[]{null, "", "frc1124", "frc254ab", "frc1114A%"}; for (String key : validKeys) { assertTrue(TeamHelper.validateMultiTeamKey(key)); } for (String key : invalidKeys) { assertFalse(TeamHelper.validateMultiTeamKey(key)); } }
public static boolean validateMultiTeamKey(@Nullable String key) { return !(key == null || key.isEmpty()) && key.matches("^frc\\d{1,4}[a-zA-Z]$"); }
TeamHelper { public static boolean validateMultiTeamKey(@Nullable String key) { return !(key == null || key.isEmpty()) && key.matches("^frc\\d{1,4}[a-zA-Z]$"); } }
TeamHelper { public static boolean validateMultiTeamKey(@Nullable String key) { return !(key == null || key.isEmpty()) && key.matches("^frc\\d{1,4}[a-zA-Z]$"); } private  TeamHelper(); }
TeamHelper { public static boolean validateMultiTeamKey(@Nullable String key) { return !(key == null || key.isEmpty()) && key.matches("^frc\\d{1,4}[a-zA-Z]$"); } private  TeamHelper(); static boolean validateTeamKey(@Nullable String key); static boolean validateMultiTeamKey(@Nullable String key); static String baseTeamKey(@Nullable String teamKey); static int getTeamNumber(@Nullable String key); }
TeamHelper { public static boolean validateMultiTeamKey(@Nullable String key) { return !(key == null || key.isEmpty()) && key.matches("^frc\\d{1,4}[a-zA-Z]$"); } private  TeamHelper(); static boolean validateTeamKey(@Nullable String key); static boolean validateMultiTeamKey(@Nullable String key); static String baseTeamKey(@Nullable String teamKey); static int getTeamNumber(@Nullable String key);  }