public static class DefaultGraphqlTypeComparatorRegistry.Builder
extends java.lang.Object
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
<T extends GraphQLType> |
addComparator(GraphqlTypeComparatorEnvironment environment,
java.lang.Class<T> comparatorClass,
java.util.Comparator<? super T> comparator)
Registers a
Comparator with an environment to control its permitted scope of operation. |
<T extends GraphQLType> |
addComparator(java.util.function.UnaryOperator<GraphqlTypeComparatorEnvironment.Builder> builderFunction,
java.lang.Class<T> comparatorClass,
java.util.Comparator<? super T> comparator)
Convenience method which supplies an environment builder function.
|
DefaultGraphqlTypeComparatorRegistry |
build() |
public <T extends GraphQLType> DefaultGraphqlTypeComparatorRegistry.Builder addComparator(GraphqlTypeComparatorEnvironment environment, java.lang.Class<T> comparatorClass, java.util.Comparator<? super T> comparator)
Comparator
with an environment to control its permitted scope of operation.T
- The specific GraphQLType
the Comparator
should operate on.environment
- Defines the scope to control where the Comparator
can be applied.comparatorClass
- The Comparator
class for added type safety. It should match environment.elementType
.comparator
- The Comparator
of type comparatorClass
.Builder
instance to allow chaining.public <T extends GraphQLType> DefaultGraphqlTypeComparatorRegistry.Builder addComparator(java.util.function.UnaryOperator<GraphqlTypeComparatorEnvironment.Builder> builderFunction, java.lang.Class<T> comparatorClass, java.util.Comparator<? super T> comparator)
T
- the graphql typebuilderFunction
- the function which is given a buildercomparatorClass
- The Comparator
class for added type safety. It should match environment.elementType
.comparator
- The Comparator
of type comparatorClass
.addComparator(graphql.schema.GraphqlTypeComparatorEnvironment, java.lang.Class<T>, java.util.Comparator<? super T>)
public DefaultGraphqlTypeComparatorRegistry build()