1 20 21 package org.jivesoftware.smack.filter; 22 23 import org.jivesoftware.smack.packet.Packet; 24 25 31 public class NotFilter implements PacketFilter { 32 33 private PacketFilter filter; 34 35 40 public NotFilter(PacketFilter filter) { 41 if (filter == null) { 42 throw new IllegalArgumentException ("Parameter cannot be null."); 43 } 44 this.filter = filter; 45 } 46 47 public boolean accept(Packet packet) { 48 return !filter.accept(packet); 49 } 50 } 51 | Popular Tags |