add method to detect if iterators started using a copy due to an index update.
@@ -77,6 +77,13 @@ public interface LowLevelIterator<T extends FeatureStructure> extends FSIterator
*/
int ll_maxAnnotSpan();
+ /**
+ * @return true if one or more of the underlying indexes this iterator goes over, has been updated
+ * since initialization or resetting operation (moveToFirst/Last/feature_structure).
+ * This includes empty iterators becoming non-empty.
+ */
+ boolean isIndexesHaveBeenUpdated();
+
/**
* an empty iterator
*/
@@ -111,5 +118,7 @@ public interface LowLevelIterator<T extends FeatureStructure> extends FSIterator
public int ll_maxAnnotSpan() { return Integer.MAX_VALUE; }
@Override
public LowLevelIndex<FeatureStructure> ll_getIndex() { return null; }
+ @Override
+ public boolean isIndexesHaveBeenUpdated() { return false; }
};
}
