@PublicApi public class DefaultGraphqlTypeComparatorRegistry extends java.lang.Object implements GraphqlTypeComparatorRegistry
Comparator
with a GraphqlTypeComparatorEnvironment
to control the scope in which the Comparator
can be applied.Modifier and Type | Class and Description |
---|---|
static class |
DefaultGraphqlTypeComparatorRegistry.Builder |
Modifier and Type | Field and Description |
---|---|
static java.util.Comparator<GraphQLSchemaElement> |
DEFAULT_COMPARATOR |
AS_IS_REGISTRY, BY_NAME_REGISTRY
Modifier and Type | Method and Description |
---|---|
static GraphqlTypeComparatorRegistry |
defaultComparators() |
<T extends GraphQLSchemaElement> |
getComparator(GraphqlTypeComparatorEnvironment environment)
Search for the most to least specific registered
Comparator otherwise a default is returned. |
static DefaultGraphqlTypeComparatorRegistry.Builder |
newComparators() |
static java.util.Comparator<GraphQLSchemaElement> |
sensibleGroupedOrder()
This orders the schema into a sensible grouped order
|
public static final java.util.Comparator<GraphQLSchemaElement> DEFAULT_COMPARATOR
public static java.util.Comparator<GraphQLSchemaElement> sensibleGroupedOrder()
public <T extends GraphQLSchemaElement> java.util.Comparator<? super T> getComparator(GraphqlTypeComparatorEnvironment environment)
Comparator
otherwise a default is returned.getComparator
in interface GraphqlTypeComparatorRegistry
T
- the type of the comparatorenvironment
- Defines the scope to control where the Comparator
can be applied.Comparator
or null
if not found.public static GraphqlTypeComparatorRegistry defaultComparators()
GraphQLType
s receive a default Comparator
by comparing GraphQLType::getName
.public static DefaultGraphqlTypeComparatorRegistry.Builder newComparators()