org.jnetstream.filter
Class Filter.OR<T extends FilterTarget>
java.lang.Object
org.jnetstream.filter.Filter.OR<T>
- All Implemented Interfaces:
- Filter<T>
- Enclosing interface:
- Filter<T extends FilterTarget>
public static final class Filter.OR<T extends FilterTarget>
- extends java.lang.Object
- implements Filter<T>
A filter used to limit that scope of captures, packet reads from a file or
from an IO stream.
- Author:
- Mark Bednarczyk, Sly Technologies, Inc.
| Fields inherited from interface org.jnetstream.filter.Filter |
TRUE |
|
Method Summary |
boolean |
accept(java.nio.ByteBuffer buffer,
T target)
|
long |
execute(java.nio.ByteBuffer buffer,
T target)
Will return the bigger of the evaluated expressions. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Filter.OR
public Filter.OR(Filter<T> left,
Filter<T> right)
accept
public boolean accept(java.nio.ByteBuffer buffer,
T target)
throws FilterException
- Specified by:
accept in interface Filter<T extends FilterTarget>
- Throws:
FilterException
execute
public long execute(java.nio.ByteBuffer buffer,
T target)
throws FilterException
- Will return the bigger of the evaluated expressions. That is if left
returns 100 and right returns 0 then 100 will be returned.
- Specified by:
execute in interface Filter<T extends FilterTarget>
- Parameters:
buffer - buffer to execute ontarget - the target specific filter
- Returns:
- largest value of the two evaluated filters
- Throws:
FilterException - TODO- See Also:
com.slytechs.capture.filter.Filter#execute(java.nio.ByteBuffer)