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 QueueThe singleton instance to be returned byCollectionsExt.emptyQueue().private static final longFor cross-version compatibility. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateDo not allow instantiation except for the singleton. -
Method Summary
Methods inherited from class java.util.AbstractQueue
add, addAll, element, removeMethods inherited from class java.util.AbstractCollection
contains, containsAll, remove, removeAll, retainAll, toArray, toArray, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
contains, containsAll, equals, hashCode, parallelStream, remove, removeAll, removeIf, retainAll, spliterator, stream, 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:
clearin interfaceCollection<E>- Overrides:
clearin classAbstractQueue<E>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceCollection<E>- Overrides:
isEmptyin classAbstractCollection<E>
-
size
public int size()- Specified by:
sizein interfaceCollection<E>- Specified by:
sizein classAbstractCollection<E>
-
iterator
- Specified by:
iteratorin interfaceCollection<E>- Specified by:
iteratorin interfaceIterable<E>- Specified by:
iteratorin classAbstractCollection<E>
-
offer
-
poll
-
peek
-
readResolve
Returns the singleton instance on deserialization.- Throws:
ObjectStreamException
-