Class GraphqlTypeComparators


  • public class GraphqlTypeComparators
    extends java.lang.Object
    • Constructor Detail

      • GraphqlTypeComparators

        public GraphqlTypeComparators()
    • Method Detail

      • sortTypes

        public static <T extends GraphQLSchemaElement> java.util.List<T> 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.
        Type Parameters:
        T - the type of type
        Parameters:
        comparator - the comparator to use
        types - the types to sort
        Returns:
        a new allocated list of sorted things
      • asIsOrder

        public static java.util.Comparator<? super GraphQLSchemaElement> asIsOrder()
        Returns a comparator that laves GraphQLType objects as they are
        Returns:
        a comparator that laves GraphQLType objects as they are
      • byNameAsc

        public static java.util.Comparator<? super GraphQLSchemaElement> byNameAsc()
        Returns a comparator that compares GraphQLType objects by ascending name
        Returns:
        a comparator that compares GraphQLType objects by ascending name