1363 |
* @return {@code true} if this queue contains the specified element |
* @return {@code true} if this queue contains the specified element |
1364 |
*/ |
*/ |
1365 |
public boolean contains(Object o) { |
public boolean contains(Object o) { |
1366 |
if (o == null) return false; |
if (o != null) { |
1367 |
for (Node p = head; p != null; p = succ(p)) { |
for (Node p = head; p != null; p = succ(p)) { |
1368 |
Object item = p.item; |
Object item = p.item; |
1369 |
if (p.isData) { |
if (p.isData) { |
1373 |
else if (item == null) |
else if (item == null) |
1374 |
break; |
break; |
1375 |
} |
} |
1376 |
|
} |
1377 |
return false; |
return false; |
1378 |
} |
} |
1379 |
|
|