@Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof State)) return false;

        State state = (State) o;

        if (id != state.id) return false;
        if (code != null ? !code.equals(state.code) : state.code != null) return false;
        if (name != null ? !name.equals(state.name) : state.name != null) return false;

        return true;
    }