Например, если у меня есть LinkedList
LinkedList<Integer> ll = new LinkedList<Integer>();
ll.add(1);
ll.add(2);
ll.add(3);
Integer x = new Integer(10);
ll.add(x);
ll.add(4);
// now the list looks like 1->2->3->10->4
// what if I want to remove 10 and I still have the reference to that node x
// what is the API of that
// somethings like ll.remove(x)...
Если я сам реализую двусвязный список, просто
currentNode.prev.next = currentNode.next;
currentNode.next.prev = currentNode.prev;
Поддерживает ли Java-реализация LinkedList эту операцию?
x
в свой список. - person Sotirios Delimanolis   schedule 12.11.2013