code: public final AbstractItem removeIfMatches(final Filter filter, PersistentTransaction transaction) throws ProtocolException, TransactionException, SevereMessageStoreException
      {
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
              SibTr.entry(this, tc, "removeIfMatches", new Object[] { filter, transaction });
  
          AbstractItem foundItem = cmdRemoveIfMatches(filter, transaction);
  
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
              SibTr.exit(this, tc, "removeIfMatches", foundItem);
          return foundItem;
      }
docs: remove the item if it matches and is available
  
  @param filter
  @param transaction
  @return item if locked
  
  @throws ProtocolException Thrown if an add is attempted when the
  transaction cannot allow any further work to be added i.e. after
  completion of the transaction.
  
  @throws TransactionException Thrown if an unexpected error occurs.
  @throws SevereMessageStoreException