Class DefaultResponseMapFactory

java.lang.Object
graphql.execution.DefaultResponseMapFactory
All Implemented Interfaces:
ResponseMapFactory

public class DefaultResponseMapFactory extends Object implements ResponseMapFactory
Implements the contract of ResponseMapFactory with LinkedHashMap. This is the default of graphql-java since a long time and changing it could cause breaking changes.
  • Constructor Details

    • DefaultResponseMapFactory

      public DefaultResponseMapFactory()
  • Method Details

    • createInsertionOrdered

      public Map<String,Object> createInsertionOrdered(List<String> keys, List<Object> values)
      Description copied from interface: ResponseMapFactory
      The general contract is that the resulting map keeps the insertion orders of keys. Values are nullable but keys are not. Implementations are free to create or to reuse map instances.
      Specified by:
      createInsertionOrdered in interface ResponseMapFactory
      Parameters:
      keys - the keys like k1, k2, ..., kn
      values - the values like v1, v2, ..., vn
      Returns:
      a new or reused map instance with (k1,v1), (k2, v2), ... (kn, vn)