private static int getIndexOfPair ( String value , Map < Integer , String > row_data ) { for ( Integer i : row_data . keySet ( ) ) { if ( row_data . get ( i ) . equals ( value ) ) { return i . intValue ( ) ; } } return - 1 ; }
returns the index of the String in the HashMap or - 1 if value was not found .