Using a string to reference a custom class member of an array list
<p>so I have a list 'Screens' which contains custom class objects of type 'screen' these are read from an XML file at run time. Also in the XML is a section called 'path' which contains strings, these are stored as further members of the 'screen' objects. What I'm trying to do is read the string value of path.left on the current screen and use to set the new value of currentScreen.
ie. 
i know..  currentScreen.path.left = "park"
so i want.. currentScreen = currentChapter.Screens.park;</p>

<p>but it doesnt like it.. I tried the following but it wont find it in the list because the list is of 'screen's and not strings. Thanks.</p>

<pre><code>String tmppath = currentScreen.path.left;
int index = currentChapter.Screens.indexOf(tmppath);
currentScreen = currentChapter.Screens.get(index);
</code></pre>

<p>the screen and path objects look like this:</p>

<pre><code>public class Screen {
    public String id;
    public Integer backdrop;
    public Paths path;
    public List&lt;Integer&gt; areaMode = new ArrayList&lt;Integer&gt;();
    public List&lt;String&gt; areaName = new ArrayList&lt;String&gt;();
    public List&lt;Region&gt; areaArray = new ArrayList&lt;Region&gt;();

    public Screen(String mid, Integer backDrop, Paths mpath, List&lt;Integer&gt; mareaMode ,List&lt;String&gt; mareaName, List&lt;Region&gt; mareaArray) {
        id = mid;
        backdrop = backDrop;
        path = mpath;
        areaMode = mareaMode;
        areaName = mareaName;
        areaArray = mareaArray;
    }
}

public class Paths {
    public String left;
    public String right;
    public String top;
    public String bottom;

    public Paths(String mleft, String mright, String mtop, String mbottom) {
        left = mleft;
        right = mright;
        top = mtop;
        bottom = mbottom;
    }
}
</code></pre>

<p>Another problem i think I'm having is that I'm trying to find the 'Screen' instance using the 'id' string I've created inside of it.</p>
