Class IterateOverEDatatypeInstances
- java.lang.Object
-
- org.eclipse.viatra.query.runtime.localsearch.operations.extend.IterateOverEDatatypeInstances
-
- All Implemented Interfaces:
IIteratingSearchOperation
,ISearchOperation
public class IterateOverEDatatypeInstances extends java.lang.Object implements IIteratingSearchOperation
Iterates over allEDataType
instances using anVIATRA Base indexer
. It is assumed that the indexer is initialized for the selectedEDataType
.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.eclipse.viatra.query.runtime.localsearch.operations.ISearchOperation
ISearchOperation.ISearchOperationExecutor
-
-
Constructor Summary
Constructors Constructor Description IterateOverEDatatypeInstances(int position, org.eclipse.emf.ecore.EDataType dataType)
-
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.org.eclipse.emf.ecore.EDataType
getDataType()
IInputKey
getIteratedInputKey()
Get theIInputKey
which instances this operation iterates upon.java.util.List<java.lang.Integer>
getVariablePositions()
java.lang.String
toString()
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.
-
-
-
Method Detail
-
getDataType
public org.eclipse.emf.ecore.EDataType getDataType()
-
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
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
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
-
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
-
getIteratedInputKey
public IInputKey getIteratedInputKey()
Description copied from interface:IIteratingSearchOperation
Get theIInputKey
which instances this operation iterates upon.- Specified by:
getIteratedInputKey
in interfaceIIteratingSearchOperation
- Since:
- 1.4
-
-