Here you can find the source of getFirstNameIndex(List
private static int getFirstNameIndex(List<String> list)
//package com.java2s; import java.util.List; import java.util.Set; public class Main { static Set<String> personStopWordSet; private static int getFirstNameIndex(List<String> list) { for (int i = 0; i < list.size(); i++) { if ((list.get(i).length() > 1) && (!personStopWordSet.contains(list.get(i)))) { return i; }/*from w w w .j av a 2 s . c om*/ } return -1; } }