https://www.netjstech.com/2022/01/java-stream-concat-with-examples.html
//code for fetch user assigned Specific design group
Long[] designGroupAssignedToUser = this.getDesignGroupBuUserId(user);
designGroupIds = Stream.concat(
Arrays.stream(Optional.ofNullable(designGroupIds).orElse(new Long[0])),
Arrays.stream(Optional.ofNullable(designGroupAssignedToUser).orElse(new Long[0]))
)
.distinct()
.toArray(Long[]::new);
//end of code
No comments:
Post a Comment