code: public static int findBestCollectionSize(Iterable<?> iterable, int bestBet) {
      return (iterable instanceof Collection ? ((Collection<?>) iterable).size() : bestBet);
    }
docs: Used to create a new collection with the correct size. Given an iterable, will try to see it the iterable actually
  have a size and will return it. If the iterable has no known size, we return the best bet.
  
  @param iterable the iterable we will try to find the size of
  @param bestBet our best bet for the size if the iterable is not sizeable
  @return the size of the iterable if found or null