public abstract class Filter extends Object
| Constructor and Description |
|---|
Filter() |
| Modifier and Type | Method and Description |
|---|---|
DataException |
addExceptionProperties(DataException exception) |
abstract boolean |
allow(Record record)
Tests whether a record passes this filter.
|
protected void |
close()
Called by
FilteringReader when FilteringReader.close() is called (after reading ends). |
static Filter |
of(Predicate<Record> predicate)
Creates a Filter from a Java Predicate.
|
protected void |
open()
Called by
FilteringReader when FilteringReader.open() is called (before reading starts). |
public DataException addExceptionProperties(DataException exception)
protected void open()
FilteringReader when FilteringReader.open() is called (before reading starts).protected void close()
FilteringReader when FilteringReader.close() is called (after reading ends).public abstract boolean allow(Record record)
Contract for subclasses (see also docs/authoring/Filter.md):
true to keep the record.false to discard the record (routed to a discard writer if
the host FilteringReader is configured with one).DataException only for unrecoverable filter failures; for
ordinary "data fails predicate" cases, return false.Copyright (c) 2006-2026 North Concepts Inc. All Rights Reserved.