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