com.exasol.adapter.document.documentpath.PathIterationStateProvider Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of virtual-schema-common-document Show documentation
Show all versions of virtual-schema-common-document Show documentation
Common module of Exasol Virtual Schema Adapters for Document Data Sources.
The newest version!
package com.exasol.adapter.document.documentpath;
/**
* This interface defines the access on the current state of a path iteration (defined by a
* {@link LoopDocumentPathIterator}). As multiple {@link ArrayAllPathSegment} can get iterated at a time, this state is
* more complex than just a number. Instead for each {@link ArrayAllPathSegment} that is iterated over the current index
* can be queried individually using {@link #getIndexFor(DocumentPathExpression)}.
*/
public interface PathIterationStateProvider {
/**
* Get the array index for the {@link ArrayAllPathSegment} defined in pathToArrayAll, to that the iterator points at
* the moment.
*
* @param pathToArrayAll path to the {@link ArrayAllPathSegment} for which the iteration index is requested
* @return iteration index
*/
int getIndexFor(DocumentPathExpression pathToArrayAll);
}