Skip to content

Instantly share code, notes, and snippets.

Created August 9, 2020 23:09
What would you like to do?
class Recommendation(val id: UUID = UUID.randomUUID(), val criteria: Criteria, talks: Set<Talk>) {
val talks: Set<Talk>
init {
this.talks = talks.toSet()
private fun checkCriteriaTalkFormatsCorrespondToTheTalksOne(talks: Set<Talk>) {
if (talks.any { !criteria.hasTalkFormat(it.format) }) {
throw IllegalArgumentException("Criteria talk formats doesn't correspond to the format of the recommended talks")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment