Package graphql.schema
Class GraphqlTypeComparators
java.lang.Object
graphql.schema.GraphqlTypeComparators
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Comparator<? super GraphQLSchemaElement> Returns a comparator that lavesGraphQLTypeobjects as they arestatic Comparator<? super GraphQLSchemaElement> Returns a comparator that comparesGraphQLTypeobjects by ascending namestatic <T extends GraphQLSchemaElement>
List<T> sortTypes(Comparator<? super GraphQLSchemaElement> comparator, Collection<T> types) This sorts the list ofGraphQLTypeobjects (by name) and allocates a new sorted list back.
-
Constructor Details
-
GraphqlTypeComparators
public GraphqlTypeComparators()
-
-
Method Details
-
sortTypes
public static <T extends GraphQLSchemaElement> List<T> sortTypes(Comparator<? super GraphQLSchemaElement> comparator, Collection<T> types) This sorts the list ofGraphQLTypeobjects (by name) and allocates a new sorted list back.- Type Parameters:
T- the type of type- Parameters:
comparator- the comparator to usetypes- the types to sort- Returns:
- a new allocated list of sorted things
-
asIsOrder
Returns a comparator that lavesGraphQLTypeobjects as they are- Returns:
- a comparator that laves
GraphQLTypeobjects as they are
-
byNameAsc
Returns a comparator that comparesGraphQLTypeobjects by ascending name- Returns:
- a comparator that compares
GraphQLTypeobjects by ascending name
-