public class HashMapTestResultCache extends Object implements TestResultCache
| Constructor and Description |
|---|
HashMapTestResultCache() |
| Modifier and Type | Method and Description |
|---|---|
void |
addResultFor(IntArrayWrapper testInput,
TestResult result)
Adds a result to the cache so it may later be retrieved via
TestResultCache.getResultFor(IntArrayWrapper). |
boolean |
containsResultFor(IntArrayWrapper testInput) |
TestResult |
getResultFor(IntArrayWrapper testInput) |
public boolean containsResultFor(IntArrayWrapper testInput)
containsResultFor in interface TestResultCachetestInput - for which a result could be needed. Must not be nullpublic TestResult getResultFor(IntArrayWrapper testInput)
getResultFor in interface TestResultCachetestInput - for which the result is needed. Must not be nullTestResultCache.containsResultFor(IntArrayWrapper) returns false for this test input, the behavior is not
defined and depends on the actual implementationpublic void addResultFor(IntArrayWrapper testInput, TestResult result)
TestResultCacheTestResultCache.getResultFor(IntArrayWrapper).
After a testInput has been added here, TestResultCache.containsResultFor(IntArrayWrapper) should returned true
if called for the same testInput.addResultFor in interface TestResultCachetestInput - for which the result should be savedresult - of the test inputCopyright © 2019. All rights reserved.