code: public WorkUnitStream filter(Predicate<WorkUnit> predicate) {
      if (this.materializedWorkUnits == null) {
        return new BasicWorkUnitStream(this, Iterators.filter(this.workUnits, predicate), null);
      } else {
        return new BasicWorkUnitStream(this, null, Lists.newArrayList(Iterables.filter(this.materializedWorkUnits, predicate)));
      }
    }
docs: Apply a filtering function to this stream.