public class DiscardingQueue extends AbstractQueue<Object>
| 构造器和说明 |
|---|
DiscardingQueue() |
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
add(Object e) |
static <E> Queue<E> |
getInstance()
获取单例的空队列
|
Iterator<Object> |
iterator() |
boolean |
offer(Object e) |
Object |
peek() |
Object |
poll() |
int |
size() |
addAll, clear, element, removecontains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcontains, containsAll, equals, hashCode, isEmpty, parallelStream, remove, removeAll, removeIf, retainAll, spliterator, stream, toArray, toArraypublic static <E> Queue<E> getInstance()
E - 节点类型public boolean add(Object e)
add 在接口中 Collection<Object>add 在接口中 Queue<Object>add 在类中 AbstractQueue<Object>public boolean offer(Object e)
public Object poll()
public Object peek()
public int size()
size 在接口中 Collection<Object>size 在类中 AbstractCollection<Object>Copyright © 2024. All rights reserved.