Class AutoCloseableConcurrentQueue<T extends AutoCloseable>
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractQueue<E>
-
- java.util.concurrent.ConcurrentLinkedQueue<T>
-
- io.github.lukehutch.fastclasspathscanner.utils.AutoCloseableConcurrentQueue<T>
-
- All Implemented Interfaces:
Serializable
,AutoCloseable
,Iterable<T>
,Collection<T>
,Queue<T>
public class AutoCloseableConcurrentQueue<T extends AutoCloseable> extends ConcurrentLinkedQueue<T> implements AutoCloseable
A list of AutoCloseable items that can be used in a try-with-resources block.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AutoCloseableConcurrentQueue()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Empty the queue, calling close() on each item.-
Methods inherited from class java.util.AbstractCollection
containsAll
-
Methods inherited from class java.util.AbstractQueue
element, remove
-
Methods inherited from interface java.util.Collection
containsAll, equals, hashCode, parallelStream, stream
-
Methods inherited from class java.util.concurrent.ConcurrentLinkedQueue
add, addAll, clear, contains, forEach, isEmpty, iterator, offer, peek, poll, remove, removeAll, removeIf, retainAll, size, spliterator, toArray, toArray, toString
-
-
-
-
Method Detail
-
close
public void close()
Empty the queue, calling close() on each item.- Specified by:
close
in interfaceAutoCloseable
-
-