Class FieldCount
java.lang.Object
com.northconcepts.datapipeline.filter.Filter
com.northconcepts.datapipeline.filter.FieldCount
A filter that checks for the total number of fields
-
Constructor Summary
ConstructorsConstructorDescriptionFieldCount(int count) Creates a filter that keeps records with exactlycountfields. -
Method Summary
Modifier and TypeMethodDescriptionaddExceptionProperties(DataException exception) Adds this filter's settings to the given exception and returns it; subclasses override it to add their own.booleanTests whether a record passes this filter.booleaninthashCode()toString()
-
Constructor Details
-
FieldCount
public FieldCount(int count) Creates a filter that keeps records with exactlycountfields.
-
-
Method Details
-
allow
Description copied from class:FilterTests whether a record passes this filter.Contract for subclasses (see also
docs/authoring/Filter.md):- Return
trueto keep the record. - Return
falseto discard the record (routed to a discard writer if the hostFilteringReaderis configured with one). - Must be a pure decision — do not mutate the record here.
- Throw
DataExceptiononly for unrecoverable filter failures; for ordinary "data fails predicate" cases, returnfalse.
- Return
-
toString
-
addExceptionProperties
Description copied from class:FilterAdds this filter's settings to the given exception and returns it; subclasses override it to add their own.- Overrides:
addExceptionPropertiesin classFilter
-
hashCode
public int hashCode() -
equals
-