Skip to content

symbatDeveloper/stage1-module5-task3

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Tasks

All methods below should be implemented in CollectionService class. To complete tasks use Stream API methods.

1. Stream Filter

Implement the method public List<Integer> filterEvenNumbers(List<Integer> list). It must filter list and return only even numbers. To complete the task use filter(...) method in Stream API.

2. Stream Map

Implement the method public List<String> toUpperCaseCollection(List<String> list). It must modify a list and return all values in upper case. To complete the task use map(...) method in Stream API.

3. Stream Max

Implement the method public Optional<Integer> findMax(List<Integer> list). It must find max number in the list. To complete the task use max(...) method in Stream API.

4. Stream FlatMap

Implement the method public Optional<Integer> findMin(List<List<Integer>> list). It must find min value among all lists. To complete the task use flatMap(...) and min(...) methods in Stream API.

5. Stream Reduce

Implement the method public Integer sum(List<Integer> list). It must calculate a sum of all elements in the list. To complete the task use reduce(...) method in Stream API.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%