class Node implements Comparable<Node> {

    @Override
    public boolean equals(Object o) {
        if (!(o instanceof Node)) return false;
        Node n = (Node) o;
        return (type.equals(n.type) && index == n.index);
    }

    public  Node(NodeType type, int index);
    public  Node(String serialized);

}