Class TimeLimitIteration<E>

    • Constructor Detail

      • TimeLimitIteration

        protected TimeLimitIteration​(CloseableIteration<? extends E> iter,
                                     long timeLimit)
    • Method Detail

      • hasNext

        public boolean hasNext()
        Description copied from class: IterationWrapper
        Checks whether the wrapped Iteration contains more elements, closing this Iteration when this is not the case.
        Specified by:
        hasNext in interface Iterator<E>
        Overrides:
        hasNext in class IterationWrapper<E>
        Returns:
        true if the wrapped Iteration contains more elements, false otherwise.
      • throwInterruptedException

        protected abstract void throwInterruptedException()
        If the iteration is interrupted by its time limit, this method is called to generate and throw the appropriate exception.