class StringToOrderTypeConverter extends StdConverter<String, OrderType> {

  @Override
  public OrderType convert(String value) {<FILL_FUNCTION_BODY>}
}

    switch (value) {
      case "buy":
        return OrderType.BID;
      case "sell":
        return OrderType.ASK;
      default:
        throw new IllegalArgumentException("Can't map " + value);
    }
  
<no_super_class>