Class StructNone
java.lang.Object
ortus.boxlang.runtime.bifs.BIF
ortus.boxlang.runtime.bifs.global.struct.StructSome
ortus.boxlang.runtime.bifs.global.struct.StructNone
@BoxBIF(description="Test whether no items in struct match the callback function")
@BoxMember(type=STRUCT)
public class StructNone
extends StructSome
-
Field Summary
Fields inherited from class ortus.boxlang.runtime.bifs.BIF
__functionName, __isMemberExecution, asyncService, cacheService, componentService, declaredArguments, functionService, interceptorService, logger, moduleService, runtime, schedulerService -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription_invoke(IBoxContext context, ArgumentsScope arguments) Used to iterate over a struct and test whether NONE item meets the test callback.Methods inherited from class ortus.boxlang.runtime.bifs.BIF
announce, getDeclaredArguments, invoke
-
Constructor Details
-
StructNone
public StructNone()Constructor
-
-
Method Details
-
_invoke
Used to iterate over a struct and test whether NONE item meets the test callback. This is the opposite ofStructSome.The function will be passed 3 arguments: the value, the index, and the struct. You can alternatively pass a Java Predicate which will only receive the 1st arg. The function should return true if the item meets the test, and false otherwise.
Note: This operation is a short-circuit operation, meaning it will stop iterating as soon as it finds the first item that does not meet the test condition.
Parallel Execution
If theparallelargument is set to true, and nomax_threadsare sent, the filter will be executed in parallel using a ForkJoinPool with parallel streams. Ifmax_threadsis specified, it will create a new ForkJoinPool with the specified number of threads to run the filter in parallel, and destroy it after the operation is complete. This allows for efficient processing of large structs, especially when the test function is computationally expensive or the struct is large.- Overrides:
_invokein classStructSome- Parameters:
context- The context in which the BIF is being invoked.arguments- Argument scope for the BIF.- Returns:
- The result of the invocation
-