Package graphql.schema
Class GraphqlTypeComparatorEnvironment
- java.lang.Object
-
- graphql.schema.GraphqlTypeComparatorEnvironment
-
@PublicApi public class GraphqlTypeComparatorEnvironment extends java.lang.Object
Defines the scope to control where the registeredComparatorcan be applied.elementTypes can be ordered within itsparentTypeto restrict theComparators scope of operation. Otherwise, supplying only theelementTyperesults in theComparatorbeing reused across all matchingGraphQLTypes regardless of parent.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classGraphqlTypeComparatorEnvironment.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)java.lang.Class<? extends GraphQLSchemaElement>getElementType()java.lang.Class<? extends GraphQLSchemaElement>getParentType()inthashCode()static GraphqlTypeComparatorEnvironment.BuildernewEnvironment()static GraphqlTypeComparatorEnvironment.BuildernewEnvironment(GraphqlTypeComparatorEnvironment existing)GraphqlTypeComparatorEnvironmenttransform(java.util.function.Consumer<GraphqlTypeComparatorEnvironment.Builder> builderConsumer)This helps you transform the currentGraphqlTypeComparatorEnvironmentinto another one by starting a builder with all the current values and allows you to transform it how you want.
-
-
-
Method Detail
-
getParentType
public java.lang.Class<? extends GraphQLSchemaElement> getParentType()
- Returns:
- The parent type or
nullif not supplied.
-
getElementType
public java.lang.Class<? extends GraphQLSchemaElement> getElementType()
- Returns:
- The valid element type or
nullif not supplied.
-
transform
public GraphqlTypeComparatorEnvironment transform(java.util.function.Consumer<GraphqlTypeComparatorEnvironment.Builder> builderConsumer)
This helps you transform the currentGraphqlTypeComparatorEnvironmentinto 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:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
newEnvironment
public static GraphqlTypeComparatorEnvironment.Builder newEnvironment()
-
newEnvironment
public static GraphqlTypeComparatorEnvironment.Builder newEnvironment(GraphqlTypeComparatorEnvironment existing)
-
-