Class NottableStringHashMap

java.lang.Object
org.mockserver.collections.NottableStringHashMap

public class NottableStringHashMap extends Object
Author:
jamesdbloom
  • 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 a NottableStringHashMap 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 KeysAndValues is 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()