Interface Filter
-
- All Superinterfaces:
EachOperation
,Operation
,Serializable
- All Known Implementing Classes:
BaseFilter
,Debug
,Equals
,FilterNull
,Negate
,TrueFilter
,TrueFilter
public interface Filter extends EachOperation
Filters take in a tuple as input and decide whether or not to keep that tuple or not.If the `isKeep()` method of a Filter returns `false` for a tuple, that tuple will be filtered out of the Stream
### Configuration If your `Filter` implementation has configuration requirements, you will typically want to extend
BaseFilter
and override theOperation.prepare(Map, TridentOperationContext)
method to perform your custom initialization.- See Also:
Stream
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
isKeep(TridentTuple tuple)
Determines if a tuple should be filtered out of a stream.
-
-
-
Method Detail
-
isKeep
boolean isKeep(TridentTuple tuple)
Determines if a tuple should be filtered out of a stream.- Parameters:
tuple
- the tuple being evaluated- Returns:
- `false` to drop the tuple, `true` to keep the tuple
-
-