graphql.language.NonNullType Maven / Gradle / Ivy
package graphql.language;
import graphql.util.TraversalControl;
import graphql.util.TraverserContext;
import java.util.ArrayList;
import java.util.List;
public class NonNullType extends AbstractNode implements Type {
private Type type;
public NonNullType() {
}
public NonNullType(Type type) {
this.type = type;
}
public Type getType() {
return type;
}
public void setType(ListType type) {
this.type = type;
}
public void setType(TypeName type) {
this.type = type;
}
@Override
public List getChildren() {
List result = new ArrayList<>();
result.add(type);
return result;
}
@Override
public boolean isEqualTo(Node o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
return true;
}
@Override
public NonNullType deepCopy() {
return new NonNullType(deepCopy(type));
}
@Override
public String toString() {
return "NonNullType{" +
"type=" + type +
'}';
}
@Override
public TraversalControl accept(TraverserContext context, NodeVisitor visitor) {
return visitor.visitNonNullType(this, context);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy