public boolean removeNode(final Node node) {
        if (this.containsNode(node)) {
            // Remove the edges (node,to) with key node in successors, and key to in predecessors
            for (Edge successor : this.successors.get(node)) {
                if (successor.getTo().compareTo(node) != 0) {
                     for (Edge predecessor : this.predecessors.get(successor.getTo())) {
                        if (predecessor.getFrom().compareTo(node) == 0) {
                            this.predecessors.get(successor.getTo()).remove(predecessor);
                        }
                    }
                }
                this.successors.remove(node);
            }
            // Remove the edges (from,node) with key node in predecessors, and key from in successors
            for (Edge predecessor : this.predecessors.get(node)) {
                if (predecessor.getFrom().compareTo(node) != 0) {
                     for (Edge successor : this.successors.get(predecessor.getFrom())) {
                        if (successor.getTo().compareTo(node) == 0) {
                            this.successors.get(predecessor.getFrom()).remove(successor);
                        }
                    }
                }
                this.predecessors.remove(node);
            }
            // Remove node
            this.nodes.remove(node);
            return true;
        }
        return false;
    }