Is it correct this form using Streams?

|
Jaschar 2022-09-16 12:27:27
He live in the Javastraat (Java Street) and is double Object Oriented πŸ˜‚
Jaschar 2022-09-16 12:42:40
Here are the slides:
Jaschar 2022-09-16 12:43:50
What a great and funny talk ☺️
Jaschar 2022-09-17 21:22:31
Hi
Mackentojj and @Eng_Rastin
Dieggo 2022-09-19 17:31:05
Hello guys.
Is it correct this form using Streams?
Dieggo 2022-09-19 17:32:18
javaofficial-25931.jpg

Eng_Rastin 2022-09-19 17:32:53
hi guys
everybody who wants to read java from A to Z complete and simply for free text me
Dieggo 2022-09-19 17:33:29
I want to find getDtRefSis and compare it with anoter date.
JFCostta 2022-09-19 17:36:28
Dieggo 2022-09-19 17:32:18
javaofficial-25931.jpg

Have you already tried

map(data -》data.isAfter(dataRef)

Assuming dataRef was initialized just before this statement?

Dieggo 2022-09-19 17:40:18
JFCostta 2022-09-19 17:36:28
javaofficial-25931.jpg
Have you already tried

map(data -》data.isAfter(dataRef)

Assuming dataRef was initialized just before this statement?

dataRef was inicialized before, so I want to compare if data passed by parameter is greather than dataRef.

JFCostta 2022-09-19 17:42:18
Dieggo 2022-09-19 17:40:18
javaofficial-25931.jpg
dataRef was inicialized before, so I want to compare if data passed by parameter is greather than dataRef.

Please, paste all the previous code of your function so we could better understand your problem. Use pastebin or gist.

Dieggo 2022-09-19 17:43:27
JFCostta 2022-09-19 17:42:18
javaofficial-25931.jpg
Please, paste all the previous code of your function so we could better understand your problem. Use pastebin or gist.

javaofficial-25937.jpg

Dieggo 2022-09-19 17:44:21
This function must validate if my data is greather than dataRefSis
Dieggo 2022-09-19 19:05:39
JFCostta 2022-09-19 17:42:18
javaofficial-25931.jpg
Please, paste all the previous code of your function so we could better understand your problem. Use pastebin or gist.

There isn’t a problem, but I would like to know if this structure using Stream API is correct to compare two dates.

Eng_Rastin 2022-09-19 20:22:43
hi guys
everybody who wants to read java from A to Z complete and simply for free text me
or replay the sms
JFCostta 2022-09-19 20:42:55
Dieggo 2022-09-19 19:05:39
javaofficial-25931.jpg
There isn’t a problem, but I would like to know if this structure using Stream API is correct to compare two dates.

I think you should read this first, there are some function calls missing in your Stream code

https://mkyong.com/java8/java-8-streams-map-examples/

Dieggo 2022-09-19 20:43:49
Ok
martin_angelo 2022-09-19 20:50:09
@JFCostta: I don’t think there is a function call missing. The function repository.findById(…) returns an Optional. So in the end, @Dieggo is not using streams here, but Optionals. Though the functions are very similar and have the same/similar concepts.

From my point of view, the usage of the mapping for optionals in this case (and also for streams) is good πŸ‘
I would approve this as a pull request….if everything would be written in english (and some other considerations). But that’s another topic πŸ˜‰

JFCostta 2022-09-19 20:54:02
martin_angelo 2022-09-19 20:50:09
javaofficial-25931.jpg
@JFCostta: I don’t think there is a function call missing. The function repository.findById(…) returns an Optional. So in the end, @Dieggo is not using streams here, but Optionals. Though the functions are very similar and have the same/similar concepts.

From my point of view, the usage of the mapping for optionals in this case (and also for streams) is good πŸ‘
I would approve this as a pull request….if everything would be written in english (and some other considerations). But that’s another topic πŸ˜‰

You’re right, I thought he was using Stream, sorry!!

Dieggo 2022-09-19 20:54:57
martin_angelo 2022-09-19 20:50:09
javaofficial-25931.jpg
@JFCostta: I don’t think there is a function call missing. The function repository.findById(…) returns an Optional. So in the end, @Dieggo is not using streams here, but Optionals. Though the functions are very similar and have the same/similar concepts.

From my point of view, the usage of the mapping for optionals in this case (and also for streams) is good πŸ‘
I would approve this as a pull request….if everything would be written in english (and some other considerations). But that’s another topic πŸ˜‰

Thanks for your feedback

|