com.igormaznitsa.mistack.TruncableIterator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mi-stack Show documentation
Show all versions of mi-stack Show documentation
Stack supports tagged items
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();
}