title: ArrayList Retrieve object by Id
body: <p>Suppose I have an <code>ArrayList&lt;Account&gt;</code> of my custom Objects which is very simple. For example:</p>
  
  <pre><code>class Account
  {
  public String Name;
  public Integer Id;
  }
  </code></pre>
  
  <p>I want to retrieve the particular <code>Account</code> object based on an <code>Id</code> parameter in many parts of my application. What would be best way of going about this ?</p>
  
  <p>I was thinking of extending <code>ArrayList</code> but I am sure there must be better way.</p>