class LoaderUtils {

  public static BuySell parseBuySell(String str) {
    switch (str.toUpperCase(Locale.ENGLISH)) {
      case "BUY":
      case "B":
        return BuySell.BUY;
      case "SELL":
      case "S":
        return BuySell.SELL;
      default:
        throw new IllegalArgumentException(
            "Unknown BuySell value, must be 'Buy' or 'Sell' but was '" + str + "'; " +
                "parser is case insensitive and also accepts 'B' and 'S'");
    }
  }

  private  LoaderUtils();

}