private static boolean containsObject ( Object searchFor , Object [ ] searchIn ) { for ( int i = 0 ; i < searchIn . length ; i ++ ) { if ( searchFor == searchIn [ i ] ) { return true ; } } return false ; }
Helper method that searches an object array for the occurence of a specific object based on reference equality