Class GraphqlTypeComparatorEnvironment


  • @PublicApi
    public class GraphqlTypeComparatorEnvironment
    extends java.lang.Object
    Defines the scope to control where the registered Comparator can be applied.

    elementTypes can be ordered within its parentType to restrict the Comparators scope of operation. Otherwise, supplying only the elementType results in the Comparator being reused across all matching GraphQLTypes regardless of parent.

    • Method Detail

      • getParentType

        public java.lang.Class<? extends GraphQLSchemaElement> getParentType()
        Returns:
        The parent type or null if not supplied.
      • getElementType

        public java.lang.Class<? extends GraphQLSchemaElement> getElementType()
        Returns:
        The valid element type or null if not supplied.
      • transform

        public GraphqlTypeComparatorEnvironment transform​(java.util.function.Consumer<GraphqlTypeComparatorEnvironment.Builder> builderConsumer)
        This helps you transform the current GraphqlTypeComparatorEnvironment into another one by starting a builder with all the current values and allows you to transform it how you want.
        Parameters:
        builderConsumer - the consumer code that will be given a builder to transform.
        Returns:
        a new object based on calling build on that builder.
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object