如何为OrderedList类编写布尔移除方法

时间:2018-10-08 00:30:20

标签: java eclipse doubly-linked-list

我现在很困惑,我需要为OrderedList类编写remove方法,这就是我到目前为止

getName on googletag.Slot is deprecated and will be removed. Use getAdUnitPath instead.

我了解算法是如何使下一项等于上一项的,但是我不确定如何实现。

2 个答案:

答案 0 :(得分:1)

https://docs.oracle.com/javase/7/docs/api/java/util/LinkedList.html

boolean remove(Object o)
Removes the first occurrence of the specified element from this list, if it is present.

答案 1 :(得分:1)

如果要使用迭代器,请iter.remove();