equal
deleted
inserted
replaced
264 downstream.begin(-1); |
264 downstream.begin(-1); |
265 } |
265 } |
266 |
266 |
267 @Override |
267 @Override |
268 public void accept(double t) { |
268 public void accept(double t) { |
269 // We can do better that this too; optimize for depth=0 case and just grab spliterator and forEach it |
269 try (DoubleStream result = mapper.apply(t)) { |
270 DoubleStream result = mapper.apply(t); |
270 // We can do better that this too; optimize for depth=0 case and just grab spliterator and forEach it |
271 if (result != null) |
271 if (result != null) |
272 result.sequential().forEach(i -> downstream.accept(i)); |
272 result.sequential().forEach(i -> downstream.accept(i)); |
|
273 } |
273 } |
274 } |
274 }; |
275 }; |
275 } |
276 } |
276 }; |
277 }; |
277 } |
278 } |