Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
佳 邓
Gitlab4j Api
Commits
529d54a6
Unverified
Commit
529d54a6
authored
6 years ago
by
Greg Messner
Committed by
GitHub
6 years ago
Browse files
Options
Download
Email Patches
Plain Diff
Added parallel Stream example.
parent
f94a51d7
main
5.0.x
5.0.x.jdk17
6.x
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
README.md
+4
-0
README.md
with
4 additions
and
0 deletions
+4
-0
README.md
+
4
-
0
View file @
529d54a6
...
@@ -163,6 +163,10 @@ Example usage:
...
@@ -163,6 +163,10 @@ Example usage:
```
java
```
java
// Stream the visible Projects printing out the project name.
// Stream the visible Projects printing out the project name.
gitlabApi
.
getProjectsApi
().
getProjectsStream
().
map
(
Project:
:
getName
).
forEach
(
name
->
System
.
out
.
println
(
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
());
```
```
---
---
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Snippets