File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
modules/ROOT/pages/traversal-framework Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -357,20 +357,20 @@ class MaxWeightPathExpander implements PathExpander<Double>
357357 }
358358
359359 @Override
360- public Iterable <Relationship> expand( Path path, BranchState<Double> branchState )
360+ public ResourceIterable <Relationship> expand( Path path, BranchState<Double> branchState )
361361 {
362362 if (path.lastRelationship() != null) {
363363 branchState.setState( branchState.getState() + (double) path.lastRelationship().getProperty( "weight" ) );
364364 }
365365
366- Iterable <Relationship> relationships = path.endNode().getRelationships( Direction.OUTGOING );
366+ ResourceIterable <Relationship> relationships = path.endNode().getRelationships( Direction.OUTGOING );
367367 ArrayList<Relationship> filtered = new ArrayList<>();
368368 for ( Relationship relationship : relationships ) {
369369 if ( branchState.getState() + (double) relationship.getProperty( "weight" ) <= maxWeight ) {
370370 filtered.add(relationship);
371371 }
372372 }
373- return filtered;
373+ return Iterables.asResourceIterable( filtered) ;
374374 }
375375
376376 @Override
You can’t perform that action at this time.
0 commit comments