Package org.openrefine.browsing.filters
Class ExpressionNumberComparisonRowFilter
- java.lang.Object
-
- org.openrefine.model.RowInRecordFilter
-
- org.openrefine.browsing.filters.ExpressionNumberComparisonRowFilter
-
- All Implemented Interfaces:
Serializable
,RecordFilter
,RowFilter
- Direct Known Subclasses:
ExpressionTimeComparisonRowFilter
public abstract class ExpressionNumberComparisonRowFilter extends RowInRecordFilter
Judge if a row matches by evaluating a given expression on the row, based on a particular column, and checking the result. It's a match if the result satisfies some numeric comparisons, or if the result is non-numeric or blank or error and we want non-numeric or blank or error values.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected RowEvaluable
_rowEvaluable
protected boolean
_selectBlank
protected boolean
_selectError
protected boolean
_selectNonNumeric
protected boolean
_selectNumeric
-
Fields inherited from class org.openrefine.model.RowInRecordFilter
ANY_ROW_IN_RECORD
-
Fields inherited from interface org.openrefine.model.RecordFilter
ANY_RECORD
-
-
Constructor Summary
Constructors Constructor Description ExpressionNumberComparisonRowFilter(RowEvaluable rowEvaluable, boolean selectNumeric, boolean selectNonNumeric, boolean selectBlank, boolean selectError, boolean invert)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract boolean
checkValue(double d)
protected boolean
checkValue(Object v)
boolean
filterRow(long rowIndex, Row row, Record record)
Determines if a row matches the filter.-
Methods inherited from class org.openrefine.model.RowInRecordFilter
filterRecord, filterRow, fromRowFilter
-
-
-
-
Field Detail
-
_rowEvaluable
protected final RowEvaluable _rowEvaluable
-
_selectNumeric
protected final boolean _selectNumeric
-
_selectNonNumeric
protected final boolean _selectNonNumeric
-
_selectBlank
protected final boolean _selectBlank
-
_selectError
protected final boolean _selectError
-
-
Constructor Detail
-
ExpressionNumberComparisonRowFilter
public ExpressionNumberComparisonRowFilter(RowEvaluable rowEvaluable, boolean selectNumeric, boolean selectNonNumeric, boolean selectBlank, boolean selectError, boolean invert)
-
-
Method Detail
-
filterRow
public boolean filterRow(long rowIndex, Row row, Record record)
Description copied from class:RowInRecordFilter
Determines if a row matches the filter.- Specified by:
filterRow
in classRowInRecordFilter
- Parameters:
rowIndex
- the global index of the row (from the entire grid)row
- the row itselfrecord
- the enclosing record- Returns:
- true if the row matches the filter
-
checkValue
protected boolean checkValue(Object v)
-
checkValue
protected abstract boolean checkValue(double d)
-
-