Package org.rumbledb.runtime.cursor
Class ContextOrArgumentLocalCursor<O>
java.lang.Object
org.rumbledb.runtime.cursor.AbstractLocalCursor<O>
org.rumbledb.runtime.cursor.ContextOrArgumentLocalCursor<O>
- All Implemented Interfaces:
AutoCloseable,Cursor<O>
Resolves an explicit argument, or the context item when the argument is omitted, and maps the resolved value.
An explicitly supplied empty sequence is passed to the mapper as null. A missing argument instead resolves
the context item, preserving the distinction required by context-dependent functions.
-
Method Summary
Modifier and TypeMethodDescriptionprotected voidstatic <O> ContextOrArgumentLocalCursor<O>flatMapArgument(@NonNull ItemRuntimePlan argumentPlan, @NonNull DynamicContext context, @NonNull Function<? super Item, ? extends List<? extends O>> mapper, @NonNull ExceptionMetadata metadata) static <O> ContextOrArgumentLocalCursor<O>flatMapFirstArgumentOrContext(@NonNull List<? extends ItemRuntimePlan> argumentPlans, @NonNull DynamicContext context, @NonNull Function<? super Item, ? extends List<? extends O>> mapper, @NonNull ExceptionMetadata metadata) protected booleanstatic <O> ContextOrArgumentLocalCursor<O>mapArgument(@NonNull ItemRuntimePlan argumentPlan, @NonNull DynamicContext context, @NonNull Function<? super Item, ? extends O> mapper, @NonNull ExceptionMetadata metadata) static <O> ContextOrArgumentLocalCursor<O>mapFirstArgumentOrContext(@NonNull List<? extends ItemRuntimePlan> argumentPlans, @NonNull DynamicContext context, @NonNull Function<? super Item, ? extends O> mapper, @NonNull ExceptionMetadata metadata) protected Oprotected voidMethods inherited from class org.rumbledb.runtime.cursor.AbstractLocalCursor
close, getMetadata, hasNext, invalidState, next
-
Method Details
-
mapArgument
public static <O> ContextOrArgumentLocalCursor<O> mapArgument(@NonNull @NonNull ItemRuntimePlan argumentPlan, @NonNull @NonNull DynamicContext context, @NonNull @NonNull Function<? super Item, ? extends O> mapper, @NonNull @NonNull ExceptionMetadata metadata) -
mapFirstArgumentOrContext
public static <O> ContextOrArgumentLocalCursor<O> mapFirstArgumentOrContext(@NonNull @NonNull List<? extends ItemRuntimePlan> argumentPlans, @NonNull @NonNull DynamicContext context, @NonNull @NonNull Function<? super Item, ? extends O> mapper, @NonNull @NonNull ExceptionMetadata metadata) -
flatMapArgument
public static <O> ContextOrArgumentLocalCursor<O> flatMapArgument(@NonNull @NonNull ItemRuntimePlan argumentPlan, @NonNull @NonNull DynamicContext context, @NonNull @NonNull Function<? super Item, ? extends List<? extends O>> mapper, @NonNull @NonNull ExceptionMetadata metadata) -
flatMapFirstArgumentOrContext
public static <O> ContextOrArgumentLocalCursor<O> flatMapFirstArgumentOrContext(@NonNull @NonNull List<? extends ItemRuntimePlan> argumentPlans, @NonNull @NonNull DynamicContext context, @NonNull @NonNull Function<? super Item, ? extends List<? extends O>> mapper, @NonNull @NonNull ExceptionMetadata metadata) -
openLocal
protected void openLocal()- Specified by:
openLocalin classAbstractLocalCursor<O>
-
hasNextLocal
protected boolean hasNextLocal()- Specified by:
hasNextLocalin classAbstractLocalCursor<O>
-
nextLocal
- Specified by:
nextLocalin classAbstractLocalCursor<O>
-
closeLocal
protected void closeLocal()- Specified by:
closeLocalin classAbstractLocalCursor<O>
-