Collection erhalten:
Set<Rel> x = findByTop(id); return x.stream() .filter(r -> r.getBottomOtyp() == otyp) .collect(Collectors.toSet()); |
Collection verkleinern:
Set<Rel> x = findByTop(id); x.removeIf(r -> (r.getBottomOtyp() != otyp)); return x; |
Collection erhalten:
Set<Rel> x = findByTop(id); return x.stream() .filter(r -> r.getBottomOtyp() == otyp) .collect(Collectors.toSet()); |
Collection verkleinern:
Set<Rel> x = findByTop(id); x.removeIf(r -> (r.getBottomOtyp() != otyp)); return x; |