title: How can I find-and-return an object in a Dequeue?
body: <p>I'm using a double-ended queue (java.util.Dequeue) and want to find an object in the queue and return it.</p>
  
  <p>I'm currently using the <code>contains()</code> method to check if the queue contains the object, but don't know how to get the actual instance of the object found. The instance being searched is <em>not</em> the same instance, as I'm overriding the <code>equals()</code> method to test equality of a subset of class variables.</p>
  
  <p>If it's not possible to do this using a Dequeue then what should I use instead? I need to push objects onto either end of a list and remove them from the start. And obviously be able to search for an object and get its instantiation.</p>