public boolean equals(Object toTaskTree) {
        boolean IDEquality=ID_EQUALITY;
        if (!this.data.equals(((TaskTree)toTaskTree).getData())) return false;
        if (IDEquality)
        {
            if (!this.id.equals(((TaskTree)toTaskTree).getID())) return false;
        }
        TaskTree[] kids1 = this.getChildren();
        TaskTree[] kids2 = ((TaskTree)toTaskTree).getChildren();
        if (kids1.length!=kids2.length) return false;
        for(int i=0; i<kids1.length; i++)
        {
            if (!kids1[i].equals(kids2[i]))
                return false;
        }
        return true;
    }