public static int indexOfLast(Object[] array, Class<?> type) { if (!isEmpty(array)) { for (int N = array.length; N > 0; N--) { Object one = array[N - 1]; if (one != null && one.getClass() == type) { return N - 1; } } } return -1; }
public static int indexOfFirst(Object[] array, Class<?> type) { if (!isEmpty(array)) { int N = -1; for (Object one : array) { N++; if (one != null && type == one.getClass()) { return N; } } } return -1; }
public static int indexOf(Object[] array, Class<?> type, int sequence) { if (!isEmpty(array)) { int N = -1; for (Object one : array) { N++; if (one != null && one.getClass() == type) { if (--sequence <= 0) { return N; } } } } return -1; }
public static int indexOfLast(Object[] array, Class<?> type) { if (!isEmpty(array)) { for (int N = array.length; N > 0; N--) { Object one = array[N - 1]; if (one != null && one.getClass() == type) { return N - 1; } } } return -1; }
public static int indexOfFirst(Object[] array, Class<?> type) { if (!isEmpty(array)) { int N = -1; for (Object one : array) { N++; if (one != null && type == one.getClass()) { return N; } } } return -1; }
public static int indexOfFirst(Object[] array, Class<?> type) { if (!isEmpty(array)) { int N = -1; for (Object one : array) { N++; if (one != null && type == one.getClass()) { return N; } } } return -1; }
public static int indexOfLast(Object[] array, Class<?> type) { if (!isEmpty(array)) { for (int N = array.length; N > 0; N--) { Object one = array[N - 1]; if (one != null && one.getClass() == type) { return N - 1; } } } return -1; }
public static int indexOf(Object[] array, Class<?> type, int sequence) { if (!isEmpty(array)) { int N = -1; for (Object one : array) { N++; if (one != null && one.getClass() == type) { if (--sequence <= 0) { return N; } } } } return -1; }
public static int indexOf(Object[] array, Class<?> type, int sequence) { if (!isEmpty(array)) { int N = -1; for (Object one : array) { N++; if (one != null && one.getClass() == type) { if (--sequence <= 0) { return N; } } } } return -1; }