Class KeysAndValues<T extends KeyAndValue,K extends KeysAndValues>

Direct Known Subclasses:
Cookies

public abstract class KeysAndValues<T extends KeyAndValue,K extends KeysAndValues> extends ObjectWithJsonToString
Author:
jamesdbloom
  • Constructor Details

  • Method Details

    • build

      public abstract T build(NottableString name, NottableString value)
    • getConvertedMatcher

      public Object getConvertedMatcher(boolean controlPlaneMatcher)
      Returns the memoized request-side conversion for the given control-plane flag, or null if not yet built. The conversion is intentionally keyed by controlPlaneMatcher because the converted form embeds a control-plane-sensitive matcher; a data-plane conversion must never be served to a control-plane caller or vice versa.
    • setConvertedMatcher

      public void setConvertedMatcher(boolean controlPlaneMatcher, Object converted)
      Stores the memoized request-side conversion for the given control-plane flag. The cache is cleared automatically on any mutation, so callers may safely reuse the value for the lifetime of an unmutated collection (e.g. across a single request's expectation scan).
    • withEntries

      public K withEntries(List<T> entries)
    • withEntries

      public K withEntries(T... entries)
    • withEntry

      public K withEntry(T entry)
    • withEntry

      public K withEntry(String name, String value)
    • withEntry

      public K withEntry(NottableString name, NottableString value)
    • replaceEntryIfExists

      public K replaceEntryIfExists(T entry)
    • getEntries

      public List<T> getEntries()
    • getMap

      public Map<NottableString,NottableString> getMap()
    • isEmpty

      public boolean isEmpty()
    • remove

      public boolean remove(NottableString name)
    • remove

      public boolean remove(String name)
    • clone

      public abstract K clone()
      Overrides:
      clone in class Object