public int getIndexOf ( Object key ) { // Get the index from the map Integer index = keyToIndex . get ( key ) ; // Check that the key is in the map and return -1 if it is not. if ( index == null ) { return - 1 ; } return index ; }
Returns the index to which this map maps the specified key .