All Downloads are FREE. Search and download functionalities are using the official Maven repository.

graphql.language.AstComparator Maven / Gradle / Ivy

There is a newer version: 230521-nf-execution
Show newest version
package graphql.language;


import java.util.List;

public class AstComparator {


    public boolean isEqual(Node node1, Node node2) {
        if (!node1.isEqualTo(node2)) return false;
        List childs1 = node1.getChildren();
        List childs2 = node2.getChildren();
        if (childs1.size() != childs2.size()) return false;
        for (int i = 0; i < childs1.size(); i++) {
            if (!isEqual(childs1.get(i), childs2.get(i))) return false;
        }
        return true;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy