Class HashMapResultCache
- java.lang.Object
-
- de.rwth.swc.coffee4j.engine.process.interleaving.HashMapResultCache
-
- All Implemented Interfaces:
ResultCache
public class HashMapResultCache extends Object implements ResultCache
DefaultResultCacheusing aHashMap.
-
-
Constructor Summary
Constructors Constructor Description HashMapResultCache()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddResultIfAbsentFor(Combination testInput, TestResult result)booleancontainsResultFor(Combination testInput)TestResultgetResultFor(Combination testInput)Map<Combination,TestResult>getResults()
-
-
-
Method Detail
-
containsResultFor
public boolean containsResultFor(Combination testInput)
- Specified by:
containsResultForin interfaceResultCache- Parameters:
testInput- test input to check whether a result is present for.- Returns:
- true iff result for test input is present.
-
getResultFor
public TestResult getResultFor(Combination testInput)
- Specified by:
getResultForin interfaceResultCache- Parameters:
testInput- test input to load a result for.- Returns:
- result for the requested test input.
-
addResultIfAbsentFor
public void addResultIfAbsentFor(Combination testInput, TestResult result)
- Specified by:
addResultIfAbsentForin interfaceResultCache- Parameters:
testInput- test input to store a result for.result- result to be stored.
-
getResults
public Map<Combination,TestResult> getResults()
- Returns:
- map containing all executed
Combinations with their correspondingTestResults.
-
-