@Override Iterator<Relationship> doExpand(final Path path, BranchState state) { return new FilteringIterator<Relationship>( expander.doExpand(path, state), new Predicate<Relationship>() { public boolean accept(Relationship item) { Path extendedPath = extend(path, item); for (Filter filter : filters) { if (filter.exclude(extendedPath)) { return false; } } return true; } }); }
public boolean isEmpty() { return !expander.doExpand(path, state).hasNext(); }