code: public static <T> void forEachWithIndex(Iterable<T> iterable, ObjectIntProcedure<? super T> objectIntProcedure)
      {
          if (iterable instanceof InternalIterable)
          {
              ((InternalIterable<T>) iterable).forEachWithIndex(objectIntProcedure);
          }
          else if (iterable instanceof ArrayList)
          {
              ArrayListIterate.forEachWithIndex((ArrayList<T>) iterable, objectIntProcedure);
          }
          else if (iterable instanceof List)
          {
              ListIterate.forEachWithIndex((List<T>) iterable, objectIntProcedure);
          }
          else if (iterable != null)
          {
              IterableIterate.forEachWithIndex(iterable, objectIntProcedure);
          }
          else
          {
              throw new IllegalArgumentException("Cannot perform a forEachWithIndex on null");
          }
      }
docs: Iterates over a collection passing each element and the current relative int index to the specified instance of
  ObjectIntProcedure.
  <p>
  Example using a Java 8 lambda expression:
  <pre>
  Iterate.<b>forEachWithIndex</b>(people, (Person person, int index) -> LOGGER.info("Index: " + index + " person: " + person.getName()));
  </pre>
  <p>
  Example using anonymous inner class:
  <pre>
  Iterate.<b>forEachWithIndex</b>(people, new ObjectIntProcedure<Person>()
  {
  public void value(Person person, int index)
  {
  LOGGER.info("Index: " + index + " person: " + person.getName());
  }
  });
  </pre>