|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.knime.base.node.preproc.filter.row.rowfilter.RowFilter
org.knime.base.node.preproc.sample.RandomNumberRowFilter
public class RandomNumberRowFilter
RowFilter implementation that fiters out rows according to a
BitSet
where each bit represents a row number.
Constructor Summary | |
---|---|
RandomNumberRowFilter(BitSet bitSet)
Creates new filter according to filter. |
Method Summary | |
---|---|
DataTableSpec |
configure(DataTableSpec inSpec)
Throws exception, not supported. |
void |
loadSettingsFrom(NodeSettingsRO cfg)
Throws exception, not supported. |
boolean |
matches(DataRow row,
int rowIndex)
Return true if the specified row matches the criteria set
in the filter. |
protected void |
saveSettings(NodeSettingsWO cfg)
Throws exception, not supported. |
Methods inherited from class org.knime.base.node.preproc.filter.row.rowfilter.RowFilter |
---|
clone, saveSettingsTo |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RandomNumberRowFilter(BitSet bitSet)
bitSet
- the set from which to retrieve the information which row is
to filter out. Bits set to one will let the corresponding row
"survive".Method Detail |
---|
public boolean matches(DataRow row, int rowIndex) throws EndOfTableException, IncludeFromNowOn
true
if the specified row matches the criteria set
in the filter. Can throw a EndOfTableException
if the filter can
tell that no more rows of the table will be able to fulfill the criteria.
matches
in class RowFilter
row
- the row to testrowIndex
- the row index of the passed row in the original table
true
if the row matches the criteria set in the
filter, false
if not
EndOfTableException
- if there is no chance that any of the rows
coming (including the current rowIndex
) will
fulfill the criteria, thus no further row in the original
table will be a match to this filter. (In general this is
hard to tell, but a row number filter can certainly use it.)
If the exception is received the row filter table iterator
will flag an end of table.
IncludeFromNowOn
- if the current and all following rows from now
on are to be included into the result tablepublic void loadSettingsFrom(NodeSettingsRO cfg) throws InvalidSettingsException
loadSettingsFrom
in class RowFilter
cfg
- the object holding the settings to load
InvalidSettingsException
- if cfg contains
invalid/incorrect/inconsistent settingsRowFilter.loadSettingsFrom(NodeSettingsRO)
protected void saveSettings(NodeSettingsWO cfg)
saveSettings
in class RowFilter
cfg
- object to add the current internal settings toRowFilter.saveSettings(NodeSettingsWO)
public DataTableSpec configure(DataTableSpec inSpec) throws InvalidSettingsException
configure
in class RowFilter
inSpec
- the new spec propagated into the row filter node. Could be
null or empty!
InvalidSettingsException
- if the settings in the row filter are
not compatible with the table spec coming inRowFilter.configure(org.knime.core.data.DataTableSpec)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |