I was wondering how to get started with Java Streams. And this video popped up in my watchlist. And, as always you have imparted your knowledge so effortlessly. Thanks a lot.
Also can create one predicate and use it List list = Arrays.asList("Phone","TV","Couch","Bike","Car"); Predicate fun2 = x-> x!="Bike"; List filterData = list.stream().filter(fun2).collect(Collectors.toList());
this map is different from maps that we use to deal with collections. Yes you can any collections as a matter of fact for a stream. A stream accepts, array, collections (lists, sets, queues) & even maps. In case of map the point is you cannot convert an entry (i.e. a key value together) to a stream but rather you can convert a key of a hashmap to a stream.
I think you can. Streams have allMatch, anyMatch, noneMatch methods. These are terminal operations so you may use any of these to check for a specific content on a web table. All of these methods accept a predicate.
Thanks Naveen.... Shared some great examples. I was wondering if anyone can help me in regards to below query: I was trying to create a Generic Method which will take List as one argument and String data_to_filter as another. The reason why I taking List as Generic so that I can use simple method with variance of different Model Class Objects for my different pages. But I am struggling to convert Predicate into Lambda Expression. @SuppressWarnings("unchecked") public static List filter_and_find_only_selected_Data1(List genericList, String dataFilter){ Stream list = genericList.stream().map(eachListObj-> { if(eachListObj instanceof Employee){ return genericList.stream().filter((Predicate
i am not yet comfortable with method referance will you please provide something so I understand things behind the screen. I don't want to follow the instruction I need to know deeply for better understanding and for the Intrest of learning.
I was wondering how to get started with Java Streams. And this video popped up in my watchlist. And, as always you have imparted your knowledge so effortlessly. Thanks a lot.
one of the best video on Streams, I saw many videos none could explain as simple as you did. thanks for making this video. I am loving it :)
Also can create one predicate and use it
List list = Arrays.asList("Phone","TV","Couch","Bike","Car");
Predicate fun2 = x-> x!="Bike";
List filterData = list.stream().filter(fun2).collect(Collectors.toList());
System.out.println(filterData);
Thanks Naveen for awesome Knowledge sharing session.
how can we sort the customer list according to age of customer Can you explain that in next video
It's a rapid fire of knowledgeable videos coming in :)
Enjoy :)
Thank you Naveen .. Soon expecting Interview Questions - Part 6 :)
Is this map is not related with collection class map?
Can we use hashmap or hashset with stream ?
this map is different from maps that we use to deal with collections.
Yes you can any collections as a matter of fact for a stream. A stream accepts, array, collections (lists, sets, queues) & even maps. In case of map the point is you cannot convert an entry (i.e. a key value together) to a stream but rather you can convert a key of a hashmap to a stream.
Using stream can we check if the content exists in a web table clicking on pgination?
I think you can. Streams have allMatch, anyMatch, noneMatch methods. These are terminal operations so you may use any of these to check for a specific content on a web table. All of these methods accept a predicate.
Where exactly we will use this Stream api? Can you pls explain in real scenarios?
Ur video, in my mobile SamsungGalaxyM57 not visible ...it's blur
How we accept the data from the keyboard instead of hard-coded values
Thanks Naveen.... Shared some great examples.
I was wondering if anyone can help me in regards to below query:
I was trying to create a Generic Method which will take List as one argument and String data_to_filter as another. The reason why I taking List as Generic so that I can use simple method with variance of different Model Class Objects for my different pages.
But I am struggling to convert Predicate into Lambda Expression.
@SuppressWarnings("unchecked")
public static List filter_and_find_only_selected_Data1(List genericList, String dataFilter){
Stream list = genericList.stream().map(eachListObj-> {
if(eachListObj instanceof Employee){
return genericList.stream().filter((Predicate
what is the difference between filer and map?
filter is if condition and map is assignment
i am not yet comfortable with method referance will you please provide something so I understand things behind the screen. I don't want to follow the instruction I need to know deeply for better understanding and for the Intrest of learning.