package org.jivesoftware.smack.filter;

import java.util.Iterator;
import org.jivesoftware.smack.packet.Stanza;

public class OrFilter extends AbstractListFilter implements StanzaFilter {
   public OrFilter() {
   }

   public OrFilter(StanzaFilter... filters) {
      super(filters);
   }

   public boolean accept(Stanza packet) {
      Iterator i$ = this.filters.iterator();

      StanzaFilter filter;
      do {
         if (!i$.hasNext()) {
            return false;
         }

         filter = (StanzaFilter)i$.next();
      } while(!filter.accept(packet));

      return true;
   }
}
