Package com.applitools.eyes
Class ScaleProviderFactory
java.lang.Object
com.applitools.eyes.ScaleProviderFactory
- Direct Known Subclasses:
FixedScaleProviderFactory,ScaleProviderIdentityFactory
Abstraction for instantiating scale providers.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionScaleProviderFactory(com.applitools.eyes.Logger logger, PropertyHandler<ScaleProvider> scaleProviderHandler) -
Method Summary
Modifier and TypeMethodDescriptiongetScaleProvider(int imageToScaleWidth) The main API for this factory.protected abstract ScaleProvidergetScaleProviderImpl(int imageToScaleWidth) The implementation of getting/creating the scale provider, should be implemented by child classes.
-
Field Details
-
logger
protected com.applitools.eyes.Logger logger
-
-
Constructor Details
-
ScaleProviderFactory
public ScaleProviderFactory(com.applitools.eyes.Logger logger, PropertyHandler<ScaleProvider> scaleProviderHandler) - Parameters:
logger- The logger to use.scaleProviderHandler- A handler to update once aScaleProviderinstance is created.
-
-
Method Details
-
getScaleProvider
The main API for this factory.- Parameters:
imageToScaleWidth- The width of the image to scale. This parameter CAN be by class implementing the factory, but this is not mandatory.- Returns:
- A
ScaleProviderinstance.
-
getScaleProviderImpl
The implementation of getting/creating the scale provider, should be implemented by child classes.- Parameters:
imageToScaleWidth- The width of the image to scale. This parameter CAN be by class implementing the factory, but this is not mandatory.- Returns:
- The scale provider to be used.
-