24 |
|
*/ |
25 |
|
|
26 |
|
package java.util; |
27 |
+ |
|
28 |
|
import java.util.function.Consumer; |
29 |
|
import java.util.stream.Stream; |
30 |
|
|
78 |
|
* |
79 |
|
* @since 1.5 |
80 |
|
* @author Josh Bloch, Doug Lea |
81 |
< |
* @param <E> the type of elements held in this collection |
81 |
> |
* @param <E> the type of elements held in this queue |
82 |
|
*/ |
83 |
|
public class PriorityQueue<E> extends AbstractQueue<E> |
84 |
|
implements java.io.Serializable { |
394 |
|
* @return {@code true} if this queue contains the specified element |
395 |
|
*/ |
396 |
|
public boolean contains(Object o) { |
397 |
< |
return indexOf(o) != -1; |
397 |
> |
return indexOf(o) >= 0; |
398 |
|
} |
399 |
|
|
400 |
|
/** |