public class GraphqlTypeComparators
extends java.lang.Object
Constructor and Description |
---|
GraphqlTypeComparators() |
Modifier and Type | Method and Description |
---|---|
static java.util.Comparator<? super GraphQLSchemaElement> |
asIsOrder()
Returns a comparator that laves
GraphQLType objects as they are |
static java.util.Comparator<? super GraphQLSchemaElement> |
byNameAsc()
Returns a comparator that compares
GraphQLType objects by ascending name |
static <T extends GraphQLSchemaElement> |
sortTypes(java.util.Comparator<? super GraphQLSchemaElement> comparator,
java.util.Collection<T> types)
This sorts the list of
GraphQLType objects (by name) and allocates a new sorted
list back. |
public static <T extends GraphQLSchemaElement> java.util.List<T> sortTypes(java.util.Comparator<? super GraphQLSchemaElement> comparator, java.util.Collection<T> types)
GraphQLType
objects (by name) and allocates a new sorted
list back.T
- the type of typecomparator
- the comparator to usetypes
- the types to sortpublic static java.util.Comparator<? super GraphQLSchemaElement> asIsOrder()
GraphQLType
objects as they areGraphQLType
objects as they arepublic static java.util.Comparator<? super GraphQLSchemaElement> byNameAsc()
GraphQLType
objects by ascending nameGraphQLType
objects by ascending name