package org.jivesoftware.smack.filter;

import org.jivesoftware.smack.XMPPConnection;
import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.packet.Stanza;

public class IQResultReplyFilter extends IQReplyFilter {
   public IQResultReplyFilter(IQ iqPacket, XMPPConnection conn) {
      super(iqPacket, conn);
   }

   public boolean accept(Stanza packet) {
      return !super.accept(packet) ? false : IQTypeFilter.RESULT.accept(packet);
   }

   public String toString() {
      StringBuilder sb = new StringBuilder();
      sb.append(this.getClass().getSimpleName());
      sb.append(" (" + super.toString() + ')');
      return sb.toString();
   }
}
