중간 연산에서 element 개수가 바뀌는 경로

입력 하나가 각 단계에서 몇 개 downstream value를 만드는지 센다.

  1. filter

    조건에 따라 0개 또는 1개를 보낸다

    selection
  2. map

    항상 출력 1개를 만든다

    one-to-one
  3. flatMap

    하위 Stream의 0개 이상을 보낸다

    fan-out
  4. distinct

    이미 본 equality value를 제거한다

    stateful

핵심: cardinality를 알면 nested collection과 빈 결과 type을 예측할 수 있다.