Package org.eclipse.scanning.points
Class AbstractMultiGenerator<T extends AbstractMultiModel<?>>
java.lang.Object
org.eclipse.scanning.api.points.AbstractGenerator<T>
org.eclipse.scanning.points.AbstractScanPointGenerator<T>
org.eclipse.scanning.points.AbstractMultiGenerator<T>
- Type Parameters:
T-
- All Implemented Interfaces:
Iterable<IPosition>,IModelProvider<T>,IPointGenerator<T>,PySerializable
- Direct Known Subclasses:
CompoundGenerator,ConcurrentMultiGenerator,ConsecutiveMultiGenerator
public abstract class AbstractMultiGenerator<T extends AbstractMultiModel<?>>
extends AbstractScanPointGenerator<T>
A Generator for Models that are made of more than one model- as currently all implementations are SPG models which
are unable to deal with CompoundModels, the validation ensures that no grid models are passed.
Maintains a list of IPointGenerator equivalent to the models its model contains, passing their PPointGenerators down.
While there is some redundancy here, the MultiModel contains all the model information in one place, and as generators
now instantiate their JythonGenerator on creation, it is better to cache them if they might be needed more than once.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected List<IPointGenerator<? extends IScanPointGeneratorModel>> protected IPointGeneratorServiceFields inherited from class org.eclipse.scanning.points.AbstractScanPointGenerator
pointGeneratorFields inherited from class org.eclipse.scanning.api.points.AbstractGenerator
model -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedprotectedAbstractMultiGenerator(T model, IPointGeneratorService service) -
Method Summary
Modifier and TypeMethodDescriptionprotected static List<IPointGenerator<? extends IScanPointGeneratorModel>> createPointGenerators(List<? extends IScanPointGeneratorModel> models) Create scan point generators corresponding to the models passed.
This serves also to validate the models, as the constructor of each generator will validate its model.protected PPointGeneratorprotected abstract JythonObjectFactory<PPointGenerator> protected List<IPointGenerator<? extends IScanPointGeneratorModel>> protected PPointGenerator[]Methods inherited from class org.eclipse.scanning.points.AbstractScanPointGenerator
createSpgCompoundGenerator, createWrappingCompoundGenerator, finalBounds, getDimensionNames, getNames, getPointGenerator, getRank, getShape, initialBounds, iterator, setModel, size, toDict, validateModelMethods inherited from class org.eclipse.scanning.api.points.AbstractGenerator
createPoints, equals, getModel, hashCode, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.eclipse.scanning.api.IModelProvider
updateModelMethods inherited from interface org.eclipse.scanning.api.points.IPointGenerator
getFirstPointMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
service
-
generators
-
-
Constructor Details
-
AbstractMultiGenerator
-
AbstractMultiGenerator
-
-
Method Details
-
createPointGenerators
protected static List<IPointGenerator<? extends IScanPointGeneratorModel>> createPointGenerators(List<? extends IScanPointGeneratorModel> models) Create scan point generators corresponding to the models passed.
This serves also to validate the models, as the constructor of each generator will validate its model.- Parameters:
models- list of models for which generators are to be created- Returns:
- list of generators created
-
createPythonPointGenerator
- Specified by:
createPythonPointGeneratorin classAbstractScanPointGenerator<T extends AbstractMultiModel<?>>
-
getFactory
-
initGenerators
-
getGenerators
-