Java Code Examples for java.util.LinkedList#lastIndexOf()

The following examples show how to use java.util.LinkedList#lastIndexOf() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ListTests.java    From spotbugs with GNU Lesser General Public License v2.1 4 votes vote down vote up
public void test4NoBugs(LinkedList<? super CharSequence> list) {
    list.lastIndexOf(new StringBuffer("Key"));
}
 
Example 2
Source File: ListTests.java    From spotbugs with GNU Lesser General Public License v2.1 4 votes vote down vote up
public void test4Bugs(LinkedList<? super CharSequence> list) {
    list.lastIndexOf(Integer.valueOf(3));
}
 
Example 3
Source File: HtmlTreeBuilder.java    From jsoup-learning with MIT License 4 votes vote down vote up
private void replaceInQueue(LinkedList<Element> queue, Element out, Element in) {
    int i = queue.lastIndexOf(out);
    Validate.isTrue(i != -1);
    queue.remove(i);
    queue.add(i, in);
}