public Iterator<WME> getMatches() {
Iterator<Individual> inds = (name == null) ? abox.getIndIterator() : IteratorUtils.singletonIterator(initNode());
return new NestedIterator<Individual, WME>(inds) {
@Override
public Iterator<WME> getInnerIterator(Individual ind) {
DependencySet depends = ind.getDepends(predicate);
return (depends == null)
? IteratorUtils.<WME>emptyIterator()
: IteratorUtils.<WME>singletonIterator(WME.createType(ind, predicate, depends));
}