code: public static long searchCost(IndexType idxType, SearchKeyType keyType, long totRecs, long matchRecs) {
  		if (idxType == IndexType.HASH)
  			return HashIndex.searchCost(keyType, totRecs, matchRecs);
  		else if (idxType == IndexType.BTREE)
  			return BTreeIndex.searchCost(keyType, totRecs, matchRecs);
  		else
  			throw new IllegalArgumentException("unsupported index type");
  	}
docs: Estimates the number of block accesses required to find all index records
  matching a search range, given the specified numbers of total records and
  matching records.
  <p>
  This number does <em>not</em> include the block accesses required to
  retrieve data records.
  </p>
  
  @param idxType
  the index type
  @param keyType
  the type of the search key
  @param totRecs
  the total number of records in the table
  @param matchRecs
  the number of matching records
  @return the estimated the number of block accesses