Interface Iteration<E,X extends java.lang.Exception>
-
- Type Parameters:
E- Object type of objects contained in the iteration.X- Exception type that is thrown when a problem occurs during iteration.
- All Known Subinterfaces:
CloseableIteration<E,X>,GraphQueryResult,QueryResult<T>,TupleQueryResult
- All Known Implementing Classes:
AbstractCloseableIteration,AbstractParserQuery.QueryInterruptIteration,AbstractParserQuery.QueryInterruptIteration,BackgroundGraphResult,BackgroundTupleResult,BadlyDesignedLeftJoinIterator,BottomUpJoinIterator,CleanerGraphQueryResult,CleanerIteration,CleanerTupleQueryResult,CloseableIteratorIteration,CloseablePeakableIteration,CollectionIteration,CollectionIteration,CompatibleBindingSetFilter,ConstructTupleFunction.GraphQueryResultIteration,ConvertingIteration,CrossProductIteration,DefaultEvaluationStrategy.ResultSizeCountingIterator,DefaultEvaluationStrategy.TimedIterator,DelayedEvaluationIteration,DelayedIteration,DescribeIteration,DistinctIteration,DistinctModelReducingUnionIteration,DualUnionIteration,EmptyIteration,ExceptionConvertingIteration,ExtensionIterator,FilterIteration,FilterIterator,GraphQueryResultImpl,GroupIterator,HashJoinIteration,InsertBindingSetCursor,IntersectIteration,IteratingGraphQueryResult,IteratingTupleQueryResult,IterationWrapper,IteratorIteration,JoinExecutorBase,JoinExecutorBase,JoinIterator,LeftJoinIterator,LimitedSizeDistinctIteration,LimitIteration,LockingIteration,LoggingCloseableIteration,LookAheadIteration,MemStatementIterator,MemStatementIteratorCache.CachedIteration,MemTripleIterator,MinusIteration,MultiProjectionIterator,MutableTupleQueryResult,OffsetIteration,OnlyNonUnique,OrderIterator,PathIteration,ProjectionIterator,QueryContextIteration,QueryEvaluationStep.DelayedEvaluationIteration,QueryResults.CleanerGraphQueryResult,QueryResults.GraphQueryResultFilter,QueryResults.TupleQueryResultFilter,QueueCursor,QueueIteration,ReducedIteration,RepositoryFederatedService.BatchingServiceIteration,RepositoryFederatedService.CloseConnectionIteration,RepositoryFederatedService.FallbackServiceIteration,RepositoryResult,SailBaseIteration,SailCloseableIteration,SailClosingIteration,SelectTupleFunction.TupleQueryResultIteration,ServiceCrossProductIteration,ServiceJoinConversionIteration,ServiceJoinConversionIteration,ServiceJoinIterator,SilentIteration,SilentIteration,SingleCloseablePlanNode.SingleCloseableIteration,SingletonIteration,SPARQLCrossProductIteration,SPARQLMinusIteration,StatementPatternQueryEvaluationStep.ConvertStatementToBindingSetIterator,StatementPatternQueryEvaluationStep.JoinStatementWithBindingSetIterator,TimeLimitIteration,TripleSourceIterationWrapper,TupleExprWrapperIteration,TupleQueryResultImpl,UnionIteration,Unique.TargetAndValueSortIterator,ZeroLengthPathIteration
@Deprecated(since="4.1.0", forRemoval=true) public interface Iteration<E,X extends java.lang.Exception>Deprecated, for removal: This API element is subject to removal in a future version.For performance and simplification the Iteration interface is deprecated and will be removed in 5.0.0. Use CloseableIteration instead, even if your iteration doesn't require AutoCloseable.An Iteration is a typed Iterator-like object that can throw (typed) Exceptions while iterating. This is used in cases where the iteration is lazy and evaluates over a (remote) connection, for example accessing a database. In such cases an error can occur at any time and needs to be communicated through a checked exception, somethingIteratorcan not do (it can only throwRuntimeExceptions.- See Also:
Iterator
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description booleanhasNext()Deprecated, for removal: This API element is subject to removal in a future version.Returns true if the iteration has more elements.Enext()Deprecated, for removal: This API element is subject to removal in a future version.Returns the next element in the iteration.voidremove()Deprecated, for removal: This API element is subject to removal in a future version.Removes from the underlying collection the last element returned by the iteration (optional operation).default java.util.stream.Stream<E>stream()Deprecated, for removal: This API element is subject to removal in a future version.Convert the results to a Java 8 Stream.
-
-
-
Method Detail
-
hasNext
boolean hasNext() throws X extends java.lang.ExceptionDeprecated, for removal: This API element is subject to removal in a future version.Returns true if the iteration has more elements. (In other words, returns true ifnext()would return an element rather than throwing a NoSuchElementException.)
-
next
E next() throws X extends java.lang.Exception
Deprecated, for removal: This API element is subject to removal in a future version.Returns the next element in the iteration.- Returns:
- the next element in the iteration.
- Throws:
java.util.NoSuchElementException- if the iteration has no more elements or if it has been closed.X extends java.lang.Exception
-
remove
void remove() throws X extends java.lang.ExceptionDeprecated, for removal: This API element is subject to removal in a future version.Removes from the underlying collection the last element returned by the iteration (optional operation). This method can be called only once per call to next.- Throws:
java.lang.UnsupportedOperationException- if the remove operation is not supported by this Iteration.java.lang.IllegalStateException- If the Iteration has been closed, or if next() has not yet been called, or remove() has already been called after the last call to next().X extends java.lang.Exception
-
stream
default java.util.stream.Stream<E> stream()
Deprecated, for removal: This API element is subject to removal in a future version.Convert the results to a Java 8 Stream. If this iteration implements CloseableIteration it should be closed (by calling Stream#close() or using try-with-resource) if it is not fully consumed.- Returns:
- stream
-
-