Skip to content

Instantly share code, notes, and snippets.

@jzelayeta
Last active May 5, 2019 21:32
Show Gist options
  • Save jzelayeta/b55d0bc9a8eec2abeb6064dfd398486d to your computer and use it in GitHub Desktop.
Save jzelayeta/b55d0bc9a8eec2abeb6064dfd398486d to your computer and use it in GitHub Desktop.
public List[Match] process(String csv) throws CSVMatchConstraintException{
List[String] rows = toRows(csv);
validator.validate(rows) //in case of invalid it will throw an exeption
return rows.stream()
.map(row => new Match(row(0), row(1), row(2), row(3)))
.collect(toList())
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment