Class AsyncShieldMultiDataSetIterator

    • Constructor Detail

      • AsyncShieldMultiDataSetIterator

        public AsyncShieldMultiDataSetIterator​(@NonNull
                                               @NonNull MultiDataSetIterator iterator)
    • Method Detail

      • next

        public MultiDataSet next​(int num)
        Fetch the next 'num' examples. Similar to the next method, but returns a specified number of examples
        Specified by:
        next in interface MultiDataSetIterator
        Parameters:
        num - Number of examples to fetch
      • setPreProcessor

        public void setPreProcessor​(MultiDataSetPreProcessor preProcessor)
        Set the preprocessor to be applied to each MultiDataSet, before each MultiDataSet is returned.
        Specified by:
        setPreProcessor in interface MultiDataSetIterator
        Parameters:
        preProcessor - MultiDataSetPreProcessor. May be null.
      • resetSupported

        public boolean resetSupported()
        Is resetting supported by this DataSetIterator? Many DataSetIterators do support resetting, but some don't
        Specified by:
        resetSupported in interface MultiDataSetIterator
        Returns:
        true if reset method is supported; false otherwise
      • asyncSupported

        public boolean asyncSupported()
        /** Does this DataSetIterator support asynchronous prefetching of multiple DataSet objects? PLEASE NOTE: This iterator ALWAYS returns FALSE
        Specified by:
        asyncSupported in interface MultiDataSetIterator
        Returns:
        true if asynchronous prefetching from this iterator is OK; false if asynchronous prefetching should not be used with this iterator
      • reset

        public void reset()
        Resets the iterator back to the beginning
        Specified by:
        reset in interface MultiDataSetIterator
      • hasNext

        public boolean hasNext()
        Returns true if the iteration has more elements. (In other words, returns true if next(int) would return an element rather than throwing an exception.)
        Specified by:
        hasNext in interface Iterator<MultiDataSet>
        Returns:
        true if the iteration has more elements
      • remove

        public void remove()
        Removes from the underlying collection the last element returned by this iterator (optional operation). This method can be called only once per call to next(int). The behavior of an iterator is unspecified if the underlying collection is modified while the iteration is in progress in any way other than by calling this method.
        Specified by:
        remove in interface Iterator<MultiDataSet>
        Throws:
        UnsupportedOperationException - if the remove operation is not supported by this iterator
        IllegalStateException - if the next method has not yet been called, or the remove method has already been called after the last call to the next method