Matching a list (of tags) with another and detecting presence of common elements
问题 My requirement is to match tags. In the example, this particular HourConstraint checks the TeacherHour assigned to Hour(23) . Specifically, it checks TeacherHour.attributes["tags"] for the values ["asst_ct","teacher_john_smith"] and detects atleast one match , two in this case (both "asst_ct" and "teacher_john_smith" ) . TeacherHour: id: 47 assigned_hour: Null attributes:Map<List<String>> "tags":["asst_ct","no_strenuous_duties","kinda_boring","teacher_john_smith"] "another_attribute":[...]