public static String[] cmdsValues() { String[] retour = new String[MarketQuotationProviders_old.values().length]; for (int i = 0; i < MarketQuotationProviders_old.values().length; i++) { retour[i] = MarketQuotationProviders_old.values()[i].cmdParam; } return retour; }
public static MarketQuotationProviders_old valueOfCmd(String cmdParam) { MarketQuotationProviders_old eValues[] = MarketQuotationProviders_old.values(); for (int i = 0; i < eValues.length; i++) { if (eValues[i].cmdParam.equals(cmdParam)) return eValues[i]; } throw new IllegalArgumentException("No enum const ProvidersTypes." + cmdParam); }
public static boolean checkProvider(String prov) { boolean contains = false; try { MarketQuotationProviders_old.valueOfCmd(prov); contains = true; } catch (IllegalArgumentException e) { LOGGER.debug("Wrong provider :" + prov, e); contains = false; } return contains; }