Package graphql.execution
Interface ResponseMapFactory
-
- All Known Implementing Classes:
DefaultResponseMapFactory
@ExperimentalApi @PublicSpi public interface ResponseMapFactory
Allows to customize the concrete classMap
implementation. For example, it could be possible to use memory-efficient implementations, like eclipse-collections.
-
-
Field Summary
Fields Modifier and Type Field Description static ResponseMapFactory
DEFAULT
The default implementation uses JDK'sLinkedHashMap
.
-
Method Summary
All Methods Instance Methods Abstract 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.
-
-
-
Field Detail
-
DEFAULT
static final ResponseMapFactory DEFAULT
The default implementation uses JDK'sLinkedHashMap
.
-
-
Method Detail
-
createInsertionOrdered
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. Values are nullable but keys are not. Implementations are free to create or to reuse map instances.- 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)
-
-