 <p>As far as the rest of your program is aware your <code>wait_queue</code> is just a <code>Collection</code>, it doesn't have <code>get</code> or <code>remove</code> methods.</p> <p>You're correct in that you don't want to couple your implementation to the variable's type, however you shouldn't use <code>Collection</code> unless you only want to iterate over the contents. Use <code>List</code>, <code>Set</code>, or other collections interfaces to describe collections. These expose the <code>get</code> and <code>remove</code> (in the case of the <code>List</code>) methods you want, and expose the <strong>behaviour</strong> of the object (but not the implementation - in this case <code>ArrayList</code>). e.g., a <code>List</code> allows duplicates whereas a <code>Set</code> does not.</p>