Class NottableStringMultiMap


public class NottableStringMultiMap extends ObjectWithReflectiveEqualsHashCodeToString
Author:
jamesdbloom
  • Constructor Details

  • Method Details

    • multiMap

      public static NottableStringMultiMap multiMap(MockServerLogger mockServerLogger, boolean controlPlaneMatcher, KeysToMultiValues<? extends KeyToMultiValue,? extends KeysToMultiValues> matched)
      Returns a NottableStringMultiMap view of the given request-side collection, reusing a memoized instance held on the collection when one is available for this controlPlaneMatcher.

      The conversion is keyed by controlPlaneMatcher because the resulting map embeds a control-plane-sensitive RegexStringMatcher; the memo on KeysToMultiValues is cleared on every mutation, so a collection that is mutated mid-scan (e.g. query parameters split by ExpandedParameterDecoder.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

      public KeyMatchStyle getKeyMatchStyle()
    • containsAll

      public boolean containsAll(MockServerLogger mockServerLogger, MatchDifference context, NottableStringMultiMap subset)
    • allKeysNotted

      public boolean allKeysNotted()
    • allKeysOptional

      public boolean allKeysOptional()
    • isEmpty

      public boolean isEmpty()