Class AbstractStreamFilter

    • Field Detail

      • inputStream

        protected ExampleStream inputStream
        The input stream to this filter.
    • Constructor Detail

      • AbstractStreamFilter

        public AbstractStreamFilter()
    • Method Detail

      • setInputStream

        public void setInputStream​(ExampleStream stream)
        Description copied from interface: StreamFilter
        Sets the input stream to the filter
        Specified by:
        setInputStream in interface StreamFilter
        Parameters:
        stream - the input stream to the filter
      • prepareForUseImpl

        public void prepareForUseImpl​(TaskMonitor monitor,
                                      ObjectRepository repository)
        Description copied from class: AbstractOptionHandler
        This method describes the implementation of how to prepare this object for use. All classes that extends this class have to implement prepareForUseImpl and not prepareForUse since prepareForUse calls prepareForUseImpl.
        Specified by:
        prepareForUseImpl in class AbstractOptionHandler
        Parameters:
        monitor - the TaskMonitor to use
        repository - the ObjectRepository to use
      • estimatedRemainingInstances

        public long estimatedRemainingInstances()
        Description copied from interface: ExampleStream
        Gets the estimated number of remaining instances in this stream
        Specified by:
        estimatedRemainingInstances in interface ExampleStream
        Returns:
        the estimated number of instances to get from this stream
      • hasMoreInstances

        public boolean hasMoreInstances()
        Description copied from interface: ExampleStream
        Gets whether this stream has more instances to output. This is useful when reading streams from files.
        Specified by:
        hasMoreInstances in interface ExampleStream
        Returns:
        true if this stream has more instances to output
      • isRestartable

        public boolean isRestartable()
        Description copied from interface: ExampleStream
        Gets whether this stream can restart.
        Specified by:
        isRestartable in interface ExampleStream
        Returns:
        true if this stream can restart
      • restart

        public void restart()
        Description copied from interface: ExampleStream
        Restarts this stream. It must be similar to starting a new stream from scratch.
        Specified by:
        restart in interface ExampleStream
      • restartImpl

        protected abstract void restartImpl()
        Restarts this filter. All instances that extends from AbstractStreamFilter must implement restartImpl. restart uses restartImpl in AbstractStreamFilter.