Package graphql.execution
Class DefaultResponseMapFactory
- java.lang.Object
-
- graphql.execution.DefaultResponseMapFactory
-
- All Implemented Interfaces:
ResponseMapFactory
public class DefaultResponseMapFactory extends java.lang.Object implements ResponseMapFactory
Implements the contract ofResponseMapFactory
withLinkedHashMap
. This is the default of graphql-java since a long time and changing it could cause breaking changes.
-
-
Field Summary
-
Fields inherited from interface graphql.execution.ResponseMapFactory
DEFAULT
-
-
Constructor Summary
Constructors Constructor Description DefaultResponseMapFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map<java.lang.String,java.lang.Object>
createInsertionOrdered(java.util.List<java.lang.String> keys, java.util.List<java.lang.Object> values)
The general contract is that the resulting map keeps the insertion orders of keys.
-
-
-
Method Detail
-
createInsertionOrdered
public java.util.Map<java.lang.String,java.lang.Object> createInsertionOrdered(java.util.List<java.lang.String> keys, java.util.List<java.lang.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 interfaceResponseMapFactory
- Parameters:
keys
- the keys like k1, k2, ..., knvalues
- the values like v1, v2, ..., vn- Returns:
- a new or reused map instance with (k1,v1), (k2, v2), ... (kn, vn)
-
-