org.jivesoftware.smack.filter
Class OrFilter
java.lang.Object
|
+--org.jivesoftware.smack.filter.OrFilter
- All Implemented Interfaces:
- PacketFilter
- public class OrFilter
- extends Object
- implements PacketFilter
Implements the logical OR operation over two packet filters. In other words, packets
pass this filter if they pass either of the filters.
- Author:
- Matt Tucker
Method Summary |
boolean |
accept(Packet packet)
Tests whether or not the specified packet should pass the filter. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OrFilter
public OrFilter(PacketFilter filter1,
PacketFilter filter2)
- Creates an OR filter using the specified filters.
- Parameters:
filter1
- the first packet filter.filter2
- the second packet filter.
accept
public boolean accept(Packet packet)
- Description copied from interface:
PacketFilter
- Tests whether or not the specified packet should pass the filter.
- Specified by:
accept
in interface PacketFilter
- Parameters:
packet
- the packet to test.
- Returns:
- true if and only if packet passes the filter.
Copyright © 2003 Jive Software.