 <p>What is the context?</p> <p>Your situation might be calling for generics, with which you could pass in <code>Collection&lt;Integer&gt;</code> or <code>Collection&lt;SomeOtherType&gt;</code> as you please.</p>