public WorkUnitStream transform(Function<WorkUnit, WorkUnit> function) {
    if (this.materializedWorkUnits == null) {
      return new BasicWorkUnitStream(this, Iterators.transform(this.workUnits, function), null);
    } else {
      return new BasicWorkUnitStream(this, null, Lists.newArrayList(Lists.transform(this.materializedWorkUnits, function)));
    }
  }
public WorkUnitStream transform ( Function < WorkUnit , WorkUnit > function ) { if ( this . materializedWorkUnits == null ) { return new BasicWorkUnitStream ( this , Iterators . transform ( this . workUnits , function ) , null ) ; } else { return new BasicWorkUnitStream ( this , null , Lists . newArrayList ( Lists . transform ( this . materializedWorkUnits , function ) ) ) ; } }
Apply a transformation function to this stream.