code: public boolean accept(ItemData item)
     {
        if (localNameHasWildcard && localNamePattern == null)
        {
           initializePattern();
        }
  
        QPathEntry itemEntry = item.getQPath().getEntries()[item.getQPath().getDepth()];
  
        if (entry.getIndex() != -1 && entry.getIndex() != itemEntry.getIndex())
        {
           return false;
        }
  
        if (!namespaceIsWildcard && !entry.getNamespace().equals(itemEntry.getNamespace()))
        {
           return false;
        }
  
        if (!localNameHasWildcard)
        {
           return entry.getName().equals(itemEntry.getName());
        }
        else
        {
           return localNamePattern.matcher(itemEntry.getName()).matches();
        }
     }
docs: {@inheritDoc}