Package de.redsix.pdfcompare.env
Class SimpleEnvironment
java.lang.Object
de.redsix.pdfcompare.env.SimpleEnvironment
- All Implemented Interfaces:
Environment
A SimpleEnvironment can be used to change environment settings programmatically.
All parameters, that were not explicitly set through setter are delegated to a
fallback Environment, which defaults to the regular environment backed by the
application.conf file.
new PdfComparator("expected.pdf", "actual.pdf")
.withEnvironment(new SimpleEnvironment()
.setExpectedColor(Color.blue))
.compare();
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleandoubleintintgetDPI()intintintintintintsetActualColor(Color actualColor) setAddEqualPagesToResult(boolean b) setAllowedDiffInPercent(double allowedDiffInPercent) setDocumentCacheSize(int documentCacheSize) setDPI(int dpi) setExecutorTimeout(int executorTimeoutInSeconds) setExpectedColor(Color expectedColor) setFailOnMissingIgnoreFile(boolean b) setMaxImageSize(int maxImageSize) setMergeCacheSize(int mergeCacheSize) setNrOfImagesToCache(int nrOfImagesToCache) setOverallTimeout(int overallTimeoutInMinutes) setParallelProcessing(boolean parallelProcessing) setSwapCacheSize(int swapCacheSize) setTempDirectory(Path tempDirectory) boolean
-
Constructor Details
-
SimpleEnvironment
public SimpleEnvironment() -
SimpleEnvironment
-
-
Method Details
-
getTempDirectory
- Specified by:
getTempDirectoryin interfaceEnvironment
-
setTempDirectory
-
getNrOfImagesToCache
public int getNrOfImagesToCache()- Specified by:
getNrOfImagesToCachein interfaceEnvironment
-
setNrOfImagesToCache
-
getMergeCacheSize
public int getMergeCacheSize()- Specified by:
getMergeCacheSizein interfaceEnvironment
-
setMergeCacheSize
-
getSwapCacheSize
public int getSwapCacheSize()- Specified by:
getSwapCacheSizein interfaceEnvironment
-
setSwapCacheSize
-
getDocumentCacheSize
public int getDocumentCacheSize()- Specified by:
getDocumentCacheSizein interfaceEnvironment
-
setDocumentCacheSize
-
getMaxImageSize
public int getMaxImageSize()- Specified by:
getMaxImageSizein interfaceEnvironment
-
setMaxImageSize
-
getOverallTimeout
public int getOverallTimeout()- Specified by:
getOverallTimeoutin interfaceEnvironment
-
setOverallTimeout
-
getExecutorTimeout
public int getExecutorTimeout()- Specified by:
getExecutorTimeoutin interfaceEnvironment
-
setExecutorTimeout
-
useParallelProcessing
public boolean useParallelProcessing()- Specified by:
useParallelProcessingin interfaceEnvironment
-
setParallelProcessing
-
getAllowedDiffInPercent
public double getAllowedDiffInPercent()- Specified by:
getAllowedDiffInPercentin interfaceEnvironment
-
setAllowedDiffInPercent
-
getExpectedColor
- Specified by:
getExpectedColorin interfaceEnvironment
-
setExpectedColor
-
getActualColor
- Specified by:
getActualColorin interfaceEnvironment
-
setActualColor
-
getDPI
public int getDPI()- Specified by:
getDPIin interfaceEnvironment
-
setDPI
-
addEqualPagesToResult
public boolean addEqualPagesToResult()- Specified by:
addEqualPagesToResultin interfaceEnvironment
-
setAddEqualPagesToResult
-
failOnMissingIgnoreFile
public boolean failOnMissingIgnoreFile()- Specified by:
failOnMissingIgnoreFilein interfaceEnvironment
-
setFailOnMissingIgnoreFile
-