Unverified Commit 529d54a6 authored by Greg Messner's avatar Greg Messner Committed by GitHub
Browse files

Added parallel Stream example.

parent f94a51d7
......@@ -163,6 +163,10 @@ Example usage:
```java
// Stream the visible Projects printing out the project name.
gitlabApi.getProjectsApi().getProjectsStream().map(Project::getName).forEach(name -> System.out.println(name));
// Operate on the stream in parallel, this example sorts User instances by username
Stream<User> stream = new UserApi(gitLabApi).getUsersStream();
List<User> sortedUsers = stream.parallel().sorted(comparing(User::getUsername)).collect(toList());
```
---
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment