public class FromMatchesFilter extends Object implements PacketFilter
Constructor and Description |
---|
FromMatchesFilter(String address,
boolean matchBare)
Creates a filter matching on the "from" field.
|
Modifier and Type | Method and Description |
---|---|
boolean |
accept(Packet packet)
Tests whether or not the specified packet should pass the filter.
|
static FromMatchesFilter |
create(String address)
Creates a filter matching on the "from" field.
|
static FromMatchesFilter |
createBare(String address)
Creates a filter matching on the "from" field.
|
static FromMatchesFilter |
createFull(String address)
Creates a filter matching on the "from" field.
|
String |
toString() |
public FromMatchesFilter(String address, boolean matchBare)
address
- The address to filter for. If null
is given, the packet must not
have a from address.matchBare
- public static FromMatchesFilter create(String address)
address
- The address to filter for. If null
is given, the packet must not
have a from address.public static FromMatchesFilter createBare(String address)
address
- The address to filter for. If null
is given, the packet must not
have a from address.public static FromMatchesFilter createFull(String address)
address
- The address to filter for. If null
is given, the packet must not
have a from address.public boolean accept(Packet packet)
PacketFilter
accept
in interface PacketFilter
packet
- the packet to test.