# | Line 77 | Line 77 | import java.util.stream.Stream; | |
---|---|---|
77 | * | |
78 | * @since 1.5 | |
79 | * @author Josh Bloch, Doug Lea | |
80 | < | * @param <E> the type of elements held in this collection |
80 | > | * @param <E> the type of elements held in this queue |
81 | */ | |
82 | public class PriorityQueue<E> extends AbstractQueue<E> | |
83 | implements java.io.Serializable { | |
# | Line 393 | Line 393 | public class PriorityQueue<E> extends Ab | |
393 | * @return {@code true} if this queue contains the specified element | |
394 | */ | |
395 | public boolean contains(Object o) { | |
396 | < | return indexOf(o) != -1; |
396 | > | return indexOf(o) >= 0; |
397 | } | |
398 | ||
399 | /** |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |