code: @ParallelSupported
      public Stream<T> distinct(final Predicate<? super Long> occurrencesFilter) {
          final Supplier<? extends Map<T, Long>> supplier = isParallel() ? Suppliers.<T, Long> ofConcurrentHashMap() : Suppliers.<T, Long> ofLinkedHashMap();
  
          return groupBy(Fn.<T> identity(), Collectors.counting(), supplier).filter(Fn.<T, Long> testByValue(occurrencesFilter)).map(Fn.<T, Long> key());
      }
docs: Distinct and filter by occurrences.
  
  @param occurrencesFilter
  @return