public UpdateInventory csvToObject(String csv){
  String[] lines=csv.split(",");
  if (lines == null || lines.length != 4) {
    throw new IllegalArgumentException("CSV line is not valid: " + csv);
  }
  String supplierId=lines[0];
  String partId=lines[1];
  String name=lines[2];
  String amount=lines[3];
  return new UpdateInventory(supplierId,partId,name,amount);
}

public UpdateInventory csvToObject ( String csv ) { String [ ] lines = csv . split ( "," ) ; if ( lines == null || lines . length != 4 ) { throw new IllegalArgumentException ( "CSV line is not valid: " + csv ) ; } String supplierId = lines [ 0 ] ; String partId = lines [ 1 ] ; String name = lines [ 2 ] ; String amount = lines [ 3 ] ; return new UpdateInventory ( supplierId , partId , name , amount ) ; }
convert the csv to a model object
