Java List Last Item getLastNameIndex(List list)

Here you can find the source of getLastNameIndex(List list)

Description

get Last Name Index

License

Open Source License

Declaration

private static int getLastNameIndex(List<String> list) 

Method Source Code

//package com.java2s;

import java.util.List;
import java.util.Set;

public class Main {
    static Set<String> personStopWordSet;

    private static int getLastNameIndex(List<String> list) {
        for (int i = list.size() - 1; i >= 0; i--) {
            if ((list.get(i).length() > 1) && (!personStopWordSet.contains(list.get(i)))) {
                return i;
            }//w  w  w.  j  a  v  a 2  s  . c o  m
        }
        return -1;
    }
}

Related

  1. getLast(List source)
  2. getLast(List list)
  3. getLastBefore(List list)
  4. getLastDateFromTimeSeriesDeltas(Double xAxisStart, List xAxisDeltas)
  5. getLastElement(List list)
  6. getLastNonNullIndex(final List list)
  7. getLastOrNull(List l)
  8. getLastOrNull(List list)
  9. getLastSectionDays(List sections)