Java Array Last Index Of lastIndexOfRef(T[] ary, int off, int len, T value)

Here you can find the source of lastIndexOfRef(T[] ary, int off, int len, T value)

Description

last Index Of Ref

License

Open Source License

Declaration

public static final <T> int lastIndexOfRef(T[] ary, int off, int len, T value) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    /** @see #lastIndexOf(Object[], int, int, Object)
     *//*  www  . j a v a 2s  .  c  o  m*/
    public static final <T> int lastIndexOfRef(T[] ary, int off, int len, T value) {
        for (int i = off + len - 1; i >= off; i--) {
            if (ary[i] == value) {
                return i;
            }
        }
        return -1;
    }
}

Related

  1. lastIndexOfArray(int r[], int rpos, int rend, char d[], int dpos)
  2. lastIndexOfChars(String src, char[] chars, int startIndex, int endIndex)
  3. lastIndexOfInsensitive(String o, String[] vals)
  4. lastIndexOfNoCheck(byte value, byte[] array, int index, int length)
  5. lastIndexOfNot(byte[] array, int obj)
  6. lastIndexOfTrim(byte[] raw, char ch, int pos)