ArrayList<String> list = ...
String item = list.get(index); // get the ith element of the list
private ArrayList<String> _categories; // Initialize all this stuff
private int getCategoryPos(String category) {
return _categories.indexOf(category);
}