title: Iterating an arraylist
body: <p>I have a ArrayList of object as below:</p>
  
  <p>Object:</p>
  
  <pre><code>String country;
  String languages;
  String number;
  </code></pre>
  
  <p>The list is as below:</p>
  
  <pre><code>India, Hindi, 500
  India, English, 600
  India, Bengali, 800
  US, French, 700
  Germany, German, 800
  </code></pre>
  
  <p>Above list is present in my code as:</p>
  
  <pre><code>List&lt;MyObject&gt; myList;  // this is the list I want to query
  </code></pre>
  
  <p>So there are 5 MyObject objects in the myList with values as mentioned before. </p>
  
  <p>language and country properties of the object makes a unique key in my case. </p>
  
  <p>So I want to fetch the corresponding number based on the language and country. </p>
  
  <p>e.g. something like:</p>
  
  <pre><code>getNumber(India, Hindi) should return 500
  getNumber(India, Bengali) should return 800
  </code></pre>
  
  <p>How to query the list in this manner ? Is it possible through Iterator ?</p>
  
  <p>Thanks for reading. </p>