You need to sign in to do that
Don't have an account?
Iryna Zasikan
Is it possible to use stream().Collectors in apex?
I want to use something like this in my trigger:
Map<Id, Id> result = anAttachmentList.stream().collect( Collectors.groupingBy( Function.identity(), Collectors.counting() ) );
Unfortuntly my Force.com IDE can't understand stream().collect.
Does anyone know is it available in Apex?
Map<Id, Id> result = anAttachmentList.stream().collect( Collectors.groupingBy( Function.identity(), Collectors.counting() ) );
Unfortuntly my Force.com IDE can't understand stream().collect.
Does anyone know is it available in Apex?
Stream.Collect is not avaliable in apex. its Java 8.
you have to achive this using set and map. there is no built in operation "Stream.Collect (accumulator,combiner,finisher)"
Hope this will help you.
Mark it BestANSWER if its clear.
Thanks
karthik