APISonar


java.util.ArrayList.lastIndexOf

> java > util > ArrayList > lastIndexOf
java APIs util APIs ArrayList APIs lastIndexOf APIs

Example 1
protected ArrayList list = null;

    public int lastIndexOf(Object element) {

        if (fast) {
            return (list.lastIndexOf(element));
        } else {
            synchronized (list) {
                return (list.lastIndexOf(element));
            }
        }

    }
Example 2
private ArrayList myArrayList;

	public int lastIndexOf(Object o) {
		// TODO Auto-generated method stub
		return myArrayList.lastIndexOf(o);
	}
Example 3
private final ArrayList<Object> list             = new ArrayList<Object>();

  public int lastIndexOf(final Object o) {
    convertAll();
    return list.lastIndexOf(o);
  }
Example 4
public void listSubtype() {
    ArrayList<String> arrayList = new ArrayList<>();
    // BUG: Diagnostic contains:
    int result = arrayList.indexOf(1);
    // BUG: Diagnostic contains:
    result = arrayList.lastIndexOf(1);
  }
Example 5
private static View getNextFocusable(View focused, ArrayList<View> focusables, int count) {
        if (focused != null) {
            int position = focusables.lastIndexOf(focused);
            if (position >= 0 && position + 1 < count) {
                return focusables.get(position + 1);
            }
        }
        return focusables.get(0);
    }
Example 6
private void replaceInQueue(ArrayList<Element> queue, Element out, Element in) {
        int i = queue.lastIndexOf(out);
        Validate.isTrue(i != -1);
        queue.set(i, in);
    }
Example 7
final ArrayList<ProcessRecord> mLruProcesses = new ArrayList<ProcessRecord>();

    final void removeLruProcessLocked(ProcessRecord app) {
        int lrui = mLruProcesses.lastIndexOf(app);
        if (lrui >= 0) {
            if (lrui <= mLruProcessActivityStart) {
                mLruProcessActivityStart--;
            }
            if (lrui <= mLruProcessServiceStart) {
                mLruProcessServiceStart--;
            }
            mLruProcesses.remove(lrui);
        }
    }
Example 8
private ArrayList<RADVisualComponent> subComponents = new ArrayList<RADVisualComponent>(10);

    public int getIndexOf(RADComponent comp) {
        if (comp != null && comp == containerMenu)
            return subComponents.size();

        return subComponents.lastIndexOf(comp);
    }