public boolean equals(Object o) {
        if (node == null || o == null || !(o instanceof Node))
            return false;
        Node n = (Node) o;
        return node == n.getNode() || node.equals(n.getNode());
    }