return new LiteDepthFirstSelector( startSource,
startThreshold );
}
} );
final int firstHalf = onDepth / 2;
Traverser startTraverser = base.prune(
Traversal.pruneAfterDepth( firstHalf ) ).expand(
expander ).filter( new Predicate<Path>()
{
public boolean accept( Path item )
{
return item.length() == firstHalf;
}
} ).traverse( start );
final int secondHalf = onDepth - firstHalf;
Traverser endTraverser = base.prune(
Traversal.pruneAfterDepth( secondHalf ) ).expand(
expander.reversed() ).filter( new Predicate<Path>()
{
public boolean accept( Path item )
{
return item.length() == secondHalf;
}
} ).traverse( end );
final Iterator<Path> startIterator = startTraverser.iterator();
final Iterator<Path> endIterator = endTraverser.iterator();
final Map<Node, Visit> visits = new HashMap<Node, Visit>();
return new PrefetchingIterator<Path>()
{
@Override