how to search like LIKe operator in sql in arraylist in java
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/4203038/how-to-search-like-like-operator-in-sql-in-hash-map-in-java">how to search like LIKe operator in sql in hash map in java</a>  </p>
</blockquote>



<p>Hi friends,</p>

<p>I am adding hashmap in arraylist .hashmap value contain company name.my requirment is if user type 'A' value. I have to display all the value start with 'A' company name .if user type  'AB'  value.I have to display all the value start with 'AB'Company name   can anybody tell how to i do?</p>

<p>my code for adding the values</p>

<pre><code> ArrayList&lt;HashMap&lt;String, String&gt;&gt; companylist = new ArrayList&lt;HashMap&lt;String, String&gt;&gt;();

StockParser stockParser=new StockParser() ;
        stockparsedvalue=stockParser.parseXmlArticle(stockservicevalue);
       for(int i=0;i&lt;stockparsedvalue.size();i++)
        {
          StockParserSet parserSet=(StockParserSet)stockparsedvalue.get(i); 
         mapValue=new HashMap&lt;String, String&gt;();                 

          mapValue.put("companyname"+i, parserSet.getCompanyname());
          companylist.add(mapValue);

        }
</code></pre>

<p>Thanks</p>
