java - Best performing method iterating and filtering a collection -


what best data structure following scenario. have collection of data , want filter out data collection , put in collection. here code-

final set<doublematrix1d> l_requiredstaticjumppoints = p_static.stream()   .filter( -> this.staticjumppointfilter( p_currentposition.getquick( 0 ),    p_targetposition.getquick( 0 ), p_currentposition.getquick( 1 ),   p_targetposition.getquick( 1 ), i.getquick( 0 ), i.getquick( 1 ), p_objects,    l_checkdirection ) )   .collect( collectors.toset() );   

here, l_requiredstaticjumppoints set , staticjumppointfilter() function doing filtering job.


Comments