A general equivalence theorem for allocation of indivisible objects