All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.igormaznitsa.mistack.TruncableIterator Maven / Gradle / Ivy

The newest version!
package com.igormaznitsa.mistack;

import java.util.Iterator;

/**
 * Extensions of iterator to provide information that the iterator was truncated by some condition and may be there are more elements, but they are ignored.
 *
 * @param  type of iterable items
 * @since 1.0.2
 */
public interface TruncableIterator extends Iterator {
  /**
   * If true then iterator was truncated by some external condition or internal logic.
   * Iterator in the state should have the same behavior like iterator with no elements.
   *
   * @return true if iteration was truncated by some condition or false if not
   */
  boolean isTruncated();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy