code: protected static int findMatchingRange(long creditCardNumber) {
  	if (creditCardNumber < 1000000000000L) {
  	    return NOT_ENOUGH_DIGITS;
  	}
  	if (creditCardNumber > 9999999999999999L) {
  	    return TOO_MANY_DIGITS;
  	}
  	// check the cached index first, where we last found a number.
  	if (ranges[cachedLastFind].low <= creditCardNumber && creditCardNumber <= ranges[cachedLastFind].high) {
  	    return cachedLastFind;
  	}
  	for (int i = 0; i < ranges.length; i++) {
  	    if (ranges[i].low <= creditCardNumber && creditCardNumber <= ranges[i].high) {
  		// we have a match
  		cachedLastFind = i;
  		return i;
  	    }
  	} // end for
  	return UNKNOWN_VENDOR;
      }
docs: Finds a matching range in the ranges array for a given creditCardNumber.
  
  @param creditCardNumber number on card.
  
  @return index of matching range, or NOT_ENOUGH_DIGITS or UNKNOWN_VENDOR on failure.