For an Android app, I have the following functionality
private ArrayList _categories; // eg [\"horses\",\"camels\"[,etc]] private int getCateg
Use indexOf() method to find first occurrence of the element in the collection.