Package org.mockserver.collections
Class NottableStringHashMap
java.lang.Object
org.mockserver.collections.NottableStringHashMap
- Author:
- jamesdbloom
-
Constructor Summary
ConstructorsConstructorDescriptionNottableStringHashMap(MockServerLogger mockServerLogger, boolean controlPlaneMatcher, List<? extends KeyAndValue> entries) NottableStringHashMap(MockServerLogger mockServerLogger, boolean controlPlaneMatcher, NottableString[]... keyAndValues) -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanbooleancontainsAll(MockServerLogger mockServerLogger, MatchDifference context, NottableStringHashMap subset) static NottableStringHashMaphashMap(MockServerLogger mockServerLogger, boolean controlPlaneMatcher, KeysAndValues<? extends KeyAndValue, ? extends KeysAndValues> matched) Returns aNottableStringHashMapview of the given request-side collection, reusing a memoized instance held on the collection when one is available for thiscontrolPlaneMatcher.booleanisEmpty()
-
Constructor Details
-
NottableStringHashMap
public NottableStringHashMap(MockServerLogger mockServerLogger, boolean controlPlaneMatcher, List<? extends KeyAndValue> entries) -
NottableStringHashMap
public NottableStringHashMap(MockServerLogger mockServerLogger, boolean controlPlaneMatcher, NottableString[]... keyAndValues)
-
-
Method Details
-
hashMap
public static NottableStringHashMap hashMap(MockServerLogger mockServerLogger, boolean controlPlaneMatcher, KeysAndValues<? extends KeyAndValue, ? extends KeysAndValues> matched) Returns aNottableStringHashMapview of the given request-side collection, reusing a memoized instance held on the collection when one is available for thiscontrolPlaneMatcher.The conversion is keyed by
controlPlaneMatcherbecause the resulting map embeds a control-plane-sensitiveRegexStringMatcher; the memo onKeysAndValuesis cleared on every mutation, so a mutated collection rebuilds rather than serving a stale view. This factory is for the request (matched) side, which would otherwise be rebuilt once per candidate expectation. -
containsAll
public boolean containsAll(MockServerLogger mockServerLogger, MatchDifference context, NottableStringHashMap subset) -
allKeysNotted
public boolean allKeysNotted() -
allKeysOptional
public boolean allKeysOptional() -
isEmpty
public boolean isEmpty()
-