@Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        Cube cube = (Cube) o;

        if (permutationId != null ? !permutationId.equals(cube.permutationId) : cube.permutationId != null)
            return false;
        if (root != null ? !root.equals(cube.root) : cube.root != null) return false;
        if (value != null ? !value.equals(cube.value) : cube.value != null) return false;

        return true;
    }