Class CountCheck
- java.lang.Object
-
- org.eclipse.viatra.query.runtime.localsearch.operations.check.CountCheck
-
- All Implemented Interfaces:
IPatternMatcherOperation
,ISearchOperation
public class CountCheck extends java.lang.Object implements ISearchOperation, IPatternMatcherOperation
Calculates the count of matches for a called matcher- No Extend:
- This class is not intended to be subclassed by clients.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.eclipse.viatra.query.runtime.localsearch.operations.ISearchOperation
ISearchOperation.ISearchOperationExecutor
-
-
Constructor Summary
Constructors Constructor Description CountCheck(CallInformation information, int position)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ISearchOperation.ISearchOperationExecutor
createExecutor()
Initializes a new operation executor for the given operation.CallInformation
getCallInformation()
Returns the precomputed call information associated with the current operationjava.util.List<java.lang.Integer>
getVariablePositions()
java.lang.String
toString(java.util.function.Function<java.lang.Integer,java.lang.String> variableMapping)
Creates a string representation of the search operation by replacing the variable numbers according to the parameter function.
-
-
-
Constructor Detail
-
CountCheck
public CountCheck(CallInformation information, int position)
- Since:
- 1.7
-
-
Method Detail
-
createExecutor
public ISearchOperation.ISearchOperationExecutor createExecutor()
Description copied from interface:ISearchOperation
Initializes a new operation executor for the given operation. Repeated calls must return different executor instances.- Specified by:
createExecutor
in interfaceISearchOperation
-
getVariablePositions
public java.util.List<java.lang.Integer> getVariablePositions()
- Specified by:
getVariablePositions
in interfaceISearchOperation
- Returns:
- the ordered list of the variable numbers that are affected by the search operation
-
toString
public java.lang.String toString(java.util.function.Function<java.lang.Integer,java.lang.String> variableMapping)
Description copied from interface:ISearchOperation
Creates a string representation of the search operation by replacing the variable numbers according to the parameter function. It is expected that the provided function does return a non-null value for each variable index that is returned byISearchOperation.getVariablePositions()
; otherwise aNullPointerException
will be thrown during the calculation of the string.- Specified by:
toString
in interfaceISearchOperation
-
getCallInformation
public CallInformation getCallInformation()
Description copied from interface:IPatternMatcherOperation
Returns the precomputed call information associated with the current operation- Specified by:
getCallInformation
in interfaceIPatternMatcherOperation
-
-