code: public static <T, IV> int detectIndexWith(List<T> list, Predicate2<? super T, ? super IV> predicate, IV injectedValue)
      {
          int size = list.size();
          for (int i = 0; i < size; i++)
          {
              if (predicate.accept(list.get(i), injectedValue))
              {
                  return i;
              }
          }
          return -1;
      }
docs: Searches for the first occurrence where the predicate evaluates to true.
  
  @see Iterate#detectIndexWith(Iterable, Predicate2, Object)