Configurable
, java.io.Serializable
, CapabilitiesHandler
, MOAObject
, OptionHandler
, ExampleStream
, StreamFilter
AddNoiseFilter
, RBFFilter
, ReLUFilter
, RemoveDiscreteAttributeFilter
, ReplacingMissingValuesFilter
public abstract class AbstractStreamFilter extends AbstractOptionHandler implements StreamFilter
Modifier and Type | Field | Description |
---|---|---|
protected ExampleStream |
inputStream |
The input stream to this filter.
|
config
Constructor | Description |
---|---|
AbstractStreamFilter() |
Modifier and Type | Method | Description |
---|---|---|
long |
estimatedRemainingInstances() |
Gets the estimated number of remaining instances in this stream
|
Instance |
filterInstance(Instance inst) |
|
boolean |
hasMoreInstances() |
Gets whether this stream has more instances to output.
|
boolean |
isRestartable() |
Gets whether this stream can restart.
|
InstanceExample |
nextInstance() |
Gets the next example from this stream.
|
void |
prepareForUseImpl(TaskMonitor monitor,
ObjectRepository repository) |
This method describes the implementation of how to prepare this object for use.
|
void |
restart() |
Restarts this stream.
|
protected abstract void |
restartImpl() |
Restarts this filter.
|
void |
setInputStream(ExampleStream stream) |
Sets the input stream to the filter
|
copy, measureByteSize, measureByteSize, toString
copy, getCLICreationString, getOptions, getPreparedClassOption, getPurposeString, prepareClassOptions, prepareForUse, prepareForUse
getCapabilities
defineImmutableCapabilities, getHeader
copy, getDescription, measureByteSize
protected ExampleStream inputStream
public void setInputStream(ExampleStream stream)
StreamFilter
setInputStream
in interface StreamFilter
stream
- the input stream to the filterpublic void prepareForUseImpl(TaskMonitor monitor, ObjectRepository repository)
AbstractOptionHandler
prepareForUseImpl
and not prepareForUse
since
prepareForUse
calls prepareForUseImpl
.prepareForUseImpl
in class AbstractOptionHandler
monitor
- the TaskMonitor to userepository
- the ObjectRepository to usepublic long estimatedRemainingInstances()
ExampleStream
estimatedRemainingInstances
in interface ExampleStream
public boolean hasMoreInstances()
ExampleStream
hasMoreInstances
in interface ExampleStream
public boolean isRestartable()
ExampleStream
isRestartable
in interface ExampleStream
public void restart()
ExampleStream
restart
in interface ExampleStream
protected abstract void restartImpl()
AbstractStreamFilter
must implement restartImpl
.
restart
uses restartImpl
in AbstractStreamFilter
.public InstanceExample nextInstance()
ExampleStream
nextInstance
in interface ExampleStream
public Instance filterInstance(Instance inst)
filterInstance
in interface StreamFilter
Copyright © 2019 University of Waikato, Hamilton, NZ. All Rights Reserved.