GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - alonsoir/java8-streaming: Playing dirty with functional java8 style streaming api. No tests methods! just only a main class with lines of code of a java 10 jshell . I felt lazy... :)

BranchesTags
Open more actions menu

Latest commit

 

History

14 Commits
14 Commits

Folders and files

NameName
Last commit message
Last commit date
bin
bin
 
 
src
src
 
 
README.md
README.md
 
 

Repository files navigation

java8-streaming

playing with functional java8 style streaming api.

actual output

25000.0
28000.0
28000.0
30000.0

total sum is 201000.0
max product price is 90000.0
min product price is 25000.0
productPriceSet is [25000.0, 28000.0]
productPriceMap is {1=HP Laptop, 2=Dell Laptop, 3=Lenevo Laptop, 4=Sony Laptop, 5=Apple Laptop}
productPriceList is [90000.0]
Now parallelizing...
25000.0
28000.0
28000.0
30000.0
total sum is 201000.0

max product price is 90000.0
min product price is 25000.0
productPriceSet is [25000.0, 28000.0]
productPriceMap is {1=HP Laptop, 2=Dell Laptop, 3=Lenevo Laptop, 4=Sony Laptop, 5=Apple Laptop}
productPriceList is [90000.0]
Creating stream from collection, set or array...
JAVA
J2EE
Spring
Hibernate
JAVA
J2EE
Spring
Hibernate
JAVA
Hibernate
J2EE
Spring

Array can also be a source of a Stream...
a
b
c
a
b
c
b
c
from streamBuilder...
a
b
c
From Stream.generate()...
element
element
element
element
element
element
element
element
element
element
From Stream.iterate()...
1
3
5
7
9
Stream of File...
// Attention, file not provided, use your own file!
2018/05/06 20:54:42,200 WARN BaseVisitor There were configuration errors!
LoosePackageCoupling: No packages or classes specified

2018/05/06 20:54:42,200 WARN BaseVisitor There were configuration errors!
LoosePackageCoupling: No packages or classes specified

Stream of Primitives...
1
2
1
2
3
0.050415604442980655
0.47084556420331924
0.24412032084607604

sorting a hashMap by value
{b=10, c=12, d=20, a=21}

reading historico_euromillones.csv sorted by total_2017, 7 values...
EMPojo [number=17, total=131, total_2017=16, total_2018=15]
EMPojo [number=30, total=127, total_2017=16, total_2018=7]
EMPojo [number=20, total=119, total_2017=14, total_2018=12]
EMPojo [number=4, total=132, total_2017=13, total_2018=10]
EMPojo [number=10, total=125, total_2017=13, total_2018=6]
EMPojo [number=19, total=126, total_2017=13, total_2018=3]
EMPojo [number=27, total=121, total_2017=13, total_2018=8]

reading historico_euromillones.csv sorted by total_2018, 7 values...
EMPojo [number=15, total=126, total_2017=9, total_2018=17]
EMPojo [number=17, total=131, total_2017=16, total_2018=15]
EMPojo [number=23, total=135, total_2017=10, total_2018=15]
EMPojo [number=44, total=138, total_2017=13, total_2018=14]
EMPojo [number=48, total=109, total_2017=11, total_2018=14]
EMPojo [number=31, total=115, total_2017=13, total_2018=13]
EMPojo [number=50, total=140, total_2017=11, total_2018=13]

About

Playing dirty with functional java8 style streaming api. No tests methods! just only a main class with lines of code of a java 10 jshell . I felt lazy... :)

Topics

funjava8java8-streamingjshell-repllearning-by-doingstream

Resources

Readme
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.