Package org.mockserver.collections
Class NottableStringMultiMap
java.lang.Object
org.mockserver.model.ObjectWithReflectiveEqualsHashCodeToString
org.mockserver.collections.NottableStringMultiMap
- Author:
- jamesdbloom
-
Constructor Summary
ConstructorsConstructorDescriptionNottableStringMultiMap(MockServerLogger mockServerLogger, boolean controlPlaneMatcher, KeyMatchStyle keyMatchStyle, List<? extends KeyToMultiValue> entries) NottableStringMultiMap(MockServerLogger mockServerLogger, boolean controlPlaneMatcher, KeyMatchStyle keyMatchStyle, NottableString[]... keyAndValues) -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanbooleancontainsAll(MockServerLogger mockServerLogger, MatchDifference context, NottableStringMultiMap subset) booleanisEmpty()static NottableStringMultiMapmultiMap(MockServerLogger mockServerLogger, boolean controlPlaneMatcher, KeysToMultiValues<? extends KeyToMultiValue, ? extends KeysToMultiValues> matched) Returns aNottableStringMultiMapview of the given request-side collection, reusing a memoized instance held on the collection when one is available for thiscontrolPlaneMatcher.Methods inherited from class org.mockserver.model.ObjectWithReflectiveEqualsHashCodeToString
equals, fieldsExcludedFromEqualsAndHashCode, hashCode, toString
-
Constructor Details
-
NottableStringMultiMap
public NottableStringMultiMap(MockServerLogger mockServerLogger, boolean controlPlaneMatcher, KeyMatchStyle keyMatchStyle, List<? extends KeyToMultiValue> entries) -
NottableStringMultiMap
public NottableStringMultiMap(MockServerLogger mockServerLogger, boolean controlPlaneMatcher, KeyMatchStyle keyMatchStyle, NottableString[]... keyAndValues)
-
-
Method Details
-
multiMap
public static NottableStringMultiMap multiMap(MockServerLogger mockServerLogger, boolean controlPlaneMatcher, KeysToMultiValues<? extends KeyToMultiValue, ? extends KeysToMultiValues> matched) Returns aNottableStringMultiMapview 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 onKeysToMultiValuesis cleared on every mutation, so a collection that is mutated mid-scan (e.g. query parameters split byExpandedParameterDecoder.splitParameters) rebuilds rather than serving a stale view.For matcher (expectation) side maps the existing constructor is used directly; this factory is for the request (matched) side, which would otherwise be rebuilt once per candidate expectation.
-
getKeyMatchStyle
-
containsAll
public boolean containsAll(MockServerLogger mockServerLogger, MatchDifference context, NottableStringMultiMap subset) -
allKeysNotted
public boolean allKeysNotted() -
allKeysOptional
public boolean allKeysOptional() -
isEmpty
public boolean isEmpty()
-