1.1.1.4. fejezet, stream

Stream kezelés

forEach

IntStream.range(0, count).forEach(i -> {
            System.out.print("-");
        });

filter

List<ClientChanges> changes = clientsService.findClientAllChange(client);
changes = changes.stream().filter(
  c -> Boolean.FALSE.equals(c.getActive()) 
  && (c.getPeriodStart() != null) 
  && c.getPeriodStart().before(nextEventDate)).collect(Collectors.toList());