public boolean equals(Object o) {
        if ( !(o instanceof DTNode) ) return false;
        if ( o == this ) return true;
        DTNode n = (DTNode)o;
        if ( n.left_bit != left_bit ) return false;
        if ( n.right_bit != right_bit ) return false;
        if ( !n.label.equals(label) ) return false;
        if ( children.size() != n.children.size() ) return false;
        for ( Map.Entry<Integer, DTNode> e : children.entrySet() ) {
            int value = e.getKey();
            DTNode cdt = e.getValue();
            DTNode odt = n.children.get(value);
            if ( cdt != odt ) return false;
        }
        return true;
    }