How best to implement search and display?
<p>I'm trying to search through a list of Objects and display any that match. With the code that I have now, that's happening if I only have 1 EditText filled in, but if I try more than that it gives me an error. I can see the problem I'm just not sure how to fix it.</p>

<pre><code>for(int i=0; i&lt;deeds.size(); i++){
        TableRow tr = new TableRow(this);
        TwoLineListItem tlli = new TwoLineListItem(this);
        TextView tv1 = new TextView(this);
        TextView tv2 = new TextView(this);
        if(deeds.get(i).getBusinessOrLastName().toString().equals(businessOrLastName)){
            tv1.setText(deeds.get(i).getBusinessOrLastName().toString());
            tv1.append(" " + deeds.get(i).getFirstName().toString());
            tv2.append("\n" + deeds.get(i).getInstrNumber().toString());
            tv2.append(" " + deeds.get(i).getBookNumber().toString());
            tv2.append(" " + deeds.get(i).getPageNumber().toString());
            tl.addView(tr);
            tr.addView(tlli);
            tlli.addView(tv1);
            tlli.addView(tv2);
        }
        if(deeds.get(i).getFirstName().toString().equals(firstName)){
            tv1.setText(deeds.get(i).getBusinessOrLastName().toString());
            tv1.append(" " + deeds.get(i).getFirstName().toString());
            tv2.append("\n" + deeds.get(i).getInstrNumber().toString());
            tv2.append(" " + deeds.get(i).getBookNumber().toString());
            tv2.append(" " + deeds.get(i).getPageNumber().toString());
            tl.addView(tr);
            tr.addView(tlli);
            tlli.addView(tv1);
            tlli.addView(tv2);
        }
        if(deeds.get(i).getInstrNumber().toString().equals(instrNumber)){
            tv1.setText(deeds.get(i).getBusinessOrLastName().toString());
            tv1.append(" " + deeds.get(i).getFirstName().toString());
            tv2.append("\n" + deeds.get(i).getInstrNumber().toString());
            tv2.append(" " + deeds.get(i).getBookNumber().toString());
            tv2.append(" " + deeds.get(i).getPageNumber().toString());
            tl.addView(tr);
            tr.addView(tlli);
            tlli.addView(tv1);
            tlli.addView(tv2);
        }
        if(deeds.get(i).getBookNumber().toString().equals(bookNumber)){
            tv1.setText(deeds.get(i).getBusinessOrLastName().toString());
            tv1.append(" " + deeds.get(i).getFirstName().toString());
            tv2.append("\n" + deeds.get(i).getInstrNumber().toString());
            tv2.append(" " + deeds.get(i).getBookNumber().toString());
            tv2.append(" " + deeds.get(i).getPageNumber().toString());
            tl.addView(tr);
            tr.addView(tlli);
            tlli.addView(tv1);
            tlli.addView(tv2);
        }
        if(deeds.get(i).getPageNumber().toString().equals(pageNumber)){
            tv1.setText(deeds.get(i).getBusinessOrLastName().toString());
            tv1.append(" " + deeds.get(i).getFirstName().toString());
            tv2.append("\n" + deeds.get(i).getInstrNumber().toString());
            tv2.append(" " + deeds.get(i).getBookNumber().toString());
            tv2.append(" " + deeds.get(i).getPageNumber().toString());
            tl.addView(tr);
            tr.addView(tlli);
            tlli.addView(tv1);
            tlli.addView(tv2);
        }
    }
</code></pre>

<p>deeds is an ArrayList of Results, a class I created that is made of 5 Strings.</p>
