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 registeredComparator
can be applied.elementType
s can be ordered within itsparentType
to restrict theComparator
s scope of operation. Otherwise, supplying only theelementType
results in theComparator
being reused across all matchingGraphQLType
s regardless of parent.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
GraphqlTypeComparatorEnvironment.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
java.lang.Class<? extends GraphQLSchemaElement>
getElementType()
java.lang.Class<? extends GraphQLSchemaElement>
getParentType()
int
hashCode()
static GraphqlTypeComparatorEnvironment.Builder
newEnvironment()
static GraphqlTypeComparatorEnvironment.Builder
newEnvironment(GraphqlTypeComparatorEnvironment existing)
GraphqlTypeComparatorEnvironment
transform(java.util.function.Consumer<GraphqlTypeComparatorEnvironment.Builder> builderConsumer)
This helps you transform the currentGraphqlTypeComparatorEnvironment
into 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
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 currentGraphqlTypeComparatorEnvironment
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 classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
newEnvironment
public static GraphqlTypeComparatorEnvironment.Builder newEnvironment()
-
newEnvironment
public static GraphqlTypeComparatorEnvironment.Builder newEnvironment(GraphqlTypeComparatorEnvironment existing)
-
-