Returns a stream consisting of the results of applying the given function to the elements of this stream. @param le the function to apply to each element @return the new mapped stream
(final LambdaExpression le)
| 83 | * @return the new mapped stream |
| 84 | */ |
| 85 | public Stream map(final LambdaExpression le) { |
| 86 | Iterator<Object> downStream = new OpIterator() { |
| 87 | @Override |
| 88 | protected void findNext() { |
| 89 | if (iterator.hasNext()) { |
| 90 | Object obj = iterator.next(); |
| 91 | next = le.invoke(obj); |
| 92 | foundNext = true; |
| 93 | } |
| 94 | } |
| 95 | }; |
| 96 | return new Stream(downStream); |
| 97 | } |
| 98 | |
| 99 | |
| 100 | /** |
no outgoing calls