无感升级中的一点思考
必须重写CompatibilityTestDO 的equals方法,保险起见重写hashCode方法。
LinkedList
public boolean remove(Object o) {if (o == null) {for (Node<E> x = first; x != null; x = x.next) {if (x.item == null) {unlink(x);return true;}}} else {for (Node<E> x = first; x != null; x = x.next) {//x.item是链表中的elementif (o.equals(x.item)) {unlink(x);return true;}}}return false;}
