1068 |
|
* @return {@code true} if this deque contains the specified element |
1069 |
|
*/ |
1070 |
|
public boolean contains(Object o) { |
1071 |
< |
if (o == null) return false; |
1072 |
< |
for (Node<E> p = first(); p != null; p = succ(p)) { |
1073 |
< |
E item = p.item; |
1074 |
< |
if (item != null && o.equals(item)) |
1075 |
< |
return true; |
1071 |
> |
if (o != null) { |
1072 |
> |
for (Node<E> p = first(); p != null; p = succ(p)) { |
1073 |
> |
E item = p.item; |
1074 |
> |
if (item != null && o.equals(item)) |
1075 |
> |
return true; |
1076 |
> |
} |
1077 |
|
} |
1078 |
|
return false; |
1079 |
|
} |