code: public static <T> MutableDoubleCollection collectDouble(
              Iterable<T> iterable,
              DoubleFunction<? super T> doubleFunction)
      {
          if (iterable instanceof MutableCollection)
          {
              return ((MutableCollection<T>) iterable).collectDouble(doubleFunction);
          }
          if (iterable instanceof ArrayList)
          {
              return ArrayListIterate.collectDouble((ArrayList<T>) iterable, doubleFunction);
          }
          if (iterable instanceof List)
          {
              return ListIterate.collectDouble((List<T>) iterable, doubleFunction);
          }
          if (iterable != null)
          {
              return IterableIterate.collectDouble(iterable, doubleFunction);
          }
          throw new IllegalArgumentException("Cannot perform a collectDouble on null");
      }
docs: Returns a new {@code double} collection with the results of applying the specified doubleFunction for each element of the iterable.
  <p>
  Example using a Java 8 lambda expression:
  <pre>
  MutableDoubleCollection doubles =
  Iterate.<b>collectDouble</b>(people, person -> person.getMilesFromNorthPole());
  </pre>
  Example using an anonymous inner class:
  <pre>
  MutableDoubleCollection doubles =
  Iterate.<b>collectDouble</b>(people,
  new DoubleFunction&lt;Person&gt;()
  {
  public double doubleValueOf(Person person)
  {
  return person.getMilesFromNorthPole();
  }
  });
  </pre>