Package com.applitools.eyes
Class ScaleProviderFactory
- java.lang.Object
-
- com.applitools.eyes.ScaleProviderFactory
-
- Direct Known Subclasses:
FixedScaleProviderFactory,ScaleProviderIdentityFactory
public abstract class ScaleProviderFactory extends Object
Abstraction for instantiating scale providers.
-
-
Field Summary
Fields Modifier and Type Field Description protected com.applitools.eyes.Loggerlogger
-
Constructor Summary
Constructors Constructor Description ScaleProviderFactory(com.applitools.eyes.Logger logger, PropertyHandler<ScaleProvider> scaleProviderHandler)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description ScaleProvidergetScaleProvider(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.
-
-
-
Constructor Detail
-
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 Detail
-
getScaleProvider
public ScaleProvider getScaleProvider(int imageToScaleWidth)
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
protected abstract ScaleProvider getScaleProviderImpl(int imageToScaleWidth)
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.
-
-