code: public static <T> void forEachWithIndex(
              ArrayList<T> list,
              int from,
              int to,
              ObjectIntProcedure<? super T> objectIntProcedure)
      {
          ListIterate.rangeCheck(from, to, list.size());
          if (ArrayListIterate.isOptimizableArrayList(list, to - from + 1))
          {
              T[] elements = ArrayListIterate.getInternalArray(list);
  
              InternalArrayIterate.forEachWithIndexWithoutChecks(elements, from, to, objectIntProcedure);
          }
          else
          {
              RandomAccessListIterate.forEachWithIndex(list, from, to, objectIntProcedure);
          }
      }
docs: Iterates over the section of the list covered by the specified indexes.  The indexes are both inclusive.  If the
  from is less than the to, the list is iterated in forward order. If the from is greater than the to, then the
  list is iterated in the reverse order. The index passed into the ObjectIntProcedure is the actual index of the
  range.
  <p>
  <pre>e.g.
  ArrayList<People> people = new ArrayList<People>(FastList.newListWith(ted, mary, bob, sally));
  ArrayListIterate.forEachWithIndex(people, 0, 1, new ObjectIntProcedure<Person>()
  {
  public void value(Person person, int index)
  {
  LOGGER.info(person.getName() + " at index: " + index);
  }
  });
  </pre>
  <p>
  This code would output ted and mary's names.