Guest User

Untitled

a guest
Feb 14th, 2019
105
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public static Cohort intersect(Cohort a, Cohort b) {
  2. Cohort ret = new Cohort();
  3. ret.setName("(" + (a == null ? "NULL" : a.getName()) + " * " + (b == null ? "NULL" : b.getName()) + ")");
  4. if (a != null && b != null) {
  5. ret.getMemberships().addAll(a.getMemberships());
  6. ret.getMemberships().retainAll(b.getMemberships());
  7. }
  8. return ret;
  9. }
RAW Paste Data