get a reference to a list inside another class
<p>In my app I have a list of Trucks that are displayed in a lisview, and every Truck has a list of cases inside it. My question is how do I get a reference to that list of cases inside the truck from the main activity.</p>

<pre><code>public class Truck  {

private String name;
public List&lt;Roadcase&gt; cases;


public Truck() {
cases = new ArrayList&lt;Roadcase&gt;();
}

public Truck(String name) {
    this.name = name;
    this.cases = new ArrayList&lt;Roadcase&gt;();
}

public String getName() {
    return name;
}

public void setName(String name) {
    this.name = name;
}

public void addRoadcase(Roadcase roadcases) {
    cases.add(roadcases);       
}

public void deleteRoadcase(Roadcase roadcases){
    cases.remove(roadcases);        
}
public int numberOfRoadcases(){
    return cases.size();
}   

public List&lt;Roadcase&gt; getList() {
    return cases;
}
}
</code></pre>

<p>my Truck class.
Thanks in advance.</p>
