Package org.apache.sis.internal.util
Class EmptyQueue<E>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractQueue<E>
org.apache.sis.internal.util.EmptyQueue<E>
- Type Parameters:
E
- type of elements in the collection.
- All Implemented Interfaces:
Serializable
,Iterable<E>
,Collection<E>
,Queue<E>
An immutable and serializable empty queue.
- Since:
- 0.3
- Version:
- 0.3
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final Queue
The singleton instance to be returned byCollectionsExt.emptyQueue()
.private static final long
For cross-version compatibility. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
Do not allow instantiation except for the singleton. -
Method Summary
Methods inherited from class java.util.AbstractQueue
add, addAll, element, remove
Methods inherited from class java.util.AbstractCollection
contains, containsAll, 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, parallelStream, remove, removeAll, removeIf, retainAll, spliterator, stream, toArray, toArray, toArray
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDFor cross-version compatibility.- See Also:
-
INSTANCE
The singleton instance to be returned byCollectionsExt.emptyQueue()
. This is not parameterized on intent.
-
-
Constructor Details
-
EmptyQueue
private EmptyQueue()Do not allow instantiation except for the singleton.
-
-
Method Details
-
clear
public void clear()- Specified by:
clear
in interfaceCollection<E>
- Overrides:
clear
in classAbstractQueue<E>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmpty
in interfaceCollection<E>
- Overrides:
isEmpty
in classAbstractCollection<E>
-
size
public int size()- Specified by:
size
in interfaceCollection<E>
- Specified by:
size
in classAbstractCollection<E>
-
iterator
- Specified by:
iterator
in interfaceCollection<E>
- Specified by:
iterator
in interfaceIterable<E>
- Specified by:
iterator
in classAbstractCollection<E>
-
offer
-
poll
-
peek
-
readResolve
Returns the singleton instance on deserialization.- Throws:
ObjectStreamException
-