class ListUtils {

  public static <T> int firstIndexOf(List<? extends T> list, Predicate<? super T> predicate) {
    Objects.requireNonNull(list, "list");
    Objects.requireNonNull(predicate, "predicate");
    for (int i = 0; i < list.size(); i++) {
      if (predicate.test(list.get(i))) {
        return i;
      }
    }
    return -1;
  }

  private  ListUtils();

}