class LoaderUtils {

  public static PayReceive parsePayReceive(String str) {
    switch (str.toUpperCase(Locale.ENGLISH)) {
      case "PAY":
      case "P":
        return PayReceive.PAY;
      case "RECEIVE":
      case "REC":
      case "R":
        return PayReceive.RECEIVE;
      default:
        throw new IllegalArgumentException(
            "Unknown PayReceive value, must be 'Pay' or 'Receive' but was '" + str + "'; " +
                "parser is case insensitive and also accepts 'P', 'Rec' and 'R'");
    }
  }

  private  LoaderUtils();

}