/**
  * Returns the description of the {@code number}. This method distinguishes the case of an invalid
  * prefix and a prefix for which the name is not available in the current language. If the
  * description is not available in the current language an empty string is returned. If no
  * description was found for the provided number, null is returned.
  *
  * @param number the phone number to look up
  * @return the description of the number
  */
 String lookup(long number) {
   int numOfEntries = phonePrefixMapStorage.getNumOfEntries();
   if (numOfEntries == 0) {
     return null;
   }
   long phonePrefix = number;
   int currentIndex = numOfEntries - 1;
   SortedSet<Integer> currentSetOfLengths = phonePrefixMapStorage.getPossibleLengths();
   while (currentSetOfLengths.size() > 0) {
     Integer possibleLength = currentSetOfLengths.last();
     String phonePrefixStr = String.valueOf(phonePrefix);
     if (phonePrefixStr.length() > possibleLength) {
       phonePrefix = Long.parseLong(phonePrefixStr.substring(0, possibleLength));
     }
     currentIndex = binarySearch(0, currentIndex, phonePrefix);
     if (currentIndex < 0) {
       return null;
     }
     int currentPrefix = phonePrefixMapStorage.getPrefix(currentIndex);
     if (phonePrefix == currentPrefix) {
       return phonePrefixMapStorage.getDescription(currentIndex);
     }
     currentSetOfLengths = currentSetOfLengths.headSet(possibleLength);
   }
   return null;
 }