Package com.palantir.common.collect
Class EmptyQueue<E>
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractQueue<E>
-
- com.palantir.common.collect.EmptyQueue<E>
-
- Type Parameters:
E
-
- All Implemented Interfaces:
Iterable<E>
,Collection<E>
,Queue<E>
public final class EmptyQueue<E> extends AbstractQueue<E>
This queue is empty and will neither return nor accept any elements
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Iterator<E>
iterator()
static <E> EmptyQueue<E>
of()
boolean
offer(E o)
E
peek()
E
poll()
int
size()
-
Methods inherited from class java.util.AbstractCollection
contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
contains, containsAll, equals, hashCode, isEmpty, parallelStream, remove, removeAll, removeIf, retainAll, spliterator, stream, toArray, toArray, toArray
-
-
-
-
Method Detail
-
of
public static <E> EmptyQueue<E> of()
-
offer
public boolean offer(E o)
-
iterator
public Iterator<E> iterator()
- Specified by:
iterator
in interfaceCollection<E>
- Specified by:
iterator
in interfaceIterable<E>
- Specified by:
iterator
in classAbstractCollection<E>
-
size
public int size()
- Specified by:
size
in interfaceCollection<E>
- Specified by:
size
in classAbstractCollection<E>
-
peek
public E peek()
-
poll
public E poll()
-
-