<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>'Dealing with large ArrayLists' Thread RSS Feed</title>
    <link>http://www.programmersheaven.com/</link>
    <description>Contains the latest posts from the thread 'Dealing with large ArrayLists' posted on the 'Java' forum at Programmer's Heaven.</description>
    <language>en</language>
    <copyright>Copyright 2013 Programmers Heaven</copyright>
    <pubDate>Fri, 24 May 2013 20:40:55 -0700</pubDate>
    <lastBuildDate>Fri, 24 May 2013 20:40:55 -0700</lastBuildDate>
    <generator>Argotic Syndication Framework 2007.3.0.1, http://www.codeplex.com/Argotic</generator>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <ttl>360</ttl>
    <image>
      <url>http://www.programmersheaven.com/images/ph.gif</url>
      <title>Programmers Heaven</title>
      <link>http://www.programmersheaven.com/</link>
      <width>88</width>
      <height>31</height>
    </image>
    <item>
      <title>Dealing with large ArrayLists</title>
      <link>http://www.programmersheaven.com/mb/java/413608/413608/dealing-with-large-arraylists/</link>
      <description>I have written methods for pathogen shedding and accumulation in a grid.&lt;br /&gt;
I have created 3 different ArrayLists: one to hold the x coord, one the hold the y coord and one to hold the deposit time (the pathogen has a halflife, I need to know deposit time).&lt;br /&gt;
I use the following :&lt;br /&gt;
&lt;br /&gt;
public void depositPathogen()&lt;br /&gt;
&lt;br /&gt;
if(this.infected==true)&lt;br /&gt;
&lt;br /&gt;
if(RandomHelper.nextDouble() &amp;lt; infectionRate)&lt;br /&gt;
xDepositList.add(infectedX); yDepositList.add(infectedY);&lt;br /&gt;
timeDepositList.add(myTick);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
public void checkForPathogenPickup()&lt;br /&gt;
if(xDepositList.contains(myX) &amp;amp;&amp;amp; yDepositList.contains(myY)){&lt;br /&gt;
for (int i=0; i&amp;lt;xDepositList.size(); i++){&lt;br /&gt;
if (xDepositList.get(i)== myX &amp;amp;&amp;amp; yDepositList.get(i)==myY) {&lt;br /&gt;
double myDepositTime = timeDepositList.get(i);&lt;br /&gt;
myPathogenInfectivity = myPathogeInfectivity + pathogHalfLife(myDepositTime,myTick)&lt;br /&gt;
&lt;br /&gt;
the methods work but since my lists get really large, it seriously increases computing time. Any ideas of how this can be done better?&lt;br /&gt;
Thanks, &lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/java/413608/413608/dealing-with-large-arraylists/</guid>
      <pubDate>Wed, 17 Feb 2010 19:08:31 -0700</pubDate>
      <category>Java</category>
    </item>
  </channel>
</rss>