private int findIndexForName ( String [ ] fieldNames , String searchName ) { for ( int i = 0 ; i < fieldNames . length ; i ++ ) { if ( searchName . equals ( fieldNames [ i ] ) ) { return i ; } } throw new PersistenceBrokerException ( "Can't find field name '" + searchName + "' in given array of field names" ) ; }
Find the index of the specified name in field name array .