Uses of Interface
java.util.Collection
Packages that useCollection
Package
Description
This package defines JDI events and event processing.
This package contains JDK extensions to the standard implementation of the
java.lang.management
API and also defines the management interface for some other components of the platform.Provides a simple high-level Http server API, which can be used to build embedded HTTP servers.
Contains all of the classes for creating user interfaces and for painting graphics and images.
Provides classes and interfaces relating to bean context.
Provides classfile parsing, generation, and transformation library.
Provides interfaces describing
class
file attributes for thejava.lang.classfile
library.Classes to support module descriptors and creating configurations of modules by means of resolution and service binding.
Provides the classes and interfaces for the security framework.
Provides classes and interfaces for parsing and managing certificates, certificate revocation lists (CRLs), and certification paths.
Contains the collections framework, some internationalization support classes, a service loader, properties, random number generation, string parsing and scanning classes, base64 encoding and decoding, a bit array, and several miscellaneous utility classes.
Utility classes commonly useful in concurrent programming.
Interfaces and classes providing a framework for locking and waiting for conditions that is distinct from built-in synchronization and monitors.
Provides classes for reading and writing the JAR (Java ARchive) file format, which is based on the standard ZIP file format with an optional manifest file.
Classes to support functional-style operations on streams of elements, such as map-reduce transformations on collections.
Provides the core classes for the Java Management Extensions.
Provides the open data types and Open MBean descriptor classes.
Provides the definition of the Relation Service.
Provides classes for the secure socket package.
Package
javax.print.attribute.standard
contains classes for specific printing attributes.The scripting API consists of interfaces and classes that defineJava Scripting Engines and providesa framework for their use in Java applications.
Standard interfaces and base classes for JDBC
RowSet
implementations.Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
Provides interfaces for tools which can be invoked from a program, for example, compilers.
Provides interfaces for creating tools, such as a Read-Eval-Print Loop (REPL), which interactively evaluate "snippets" of Java programming language code.
Uses ofCollection incom.sun.jdi.event
Subinterfaces ofCollection incom.sun.jdi.eventModifier and TypeInterfaceDescriptioninterface
SeveralEvent
objects may be created at a given time by the targetVirtualMachine
.Uses ofCollection incom.sun.management
Methods incom.sun.management that returnCollectionUses ofCollection incom.sun.net.httpserver
Methods incom.sun.net.httpserver that returnCollectionUses ofCollection injava.awt
Methods injava.awt that returnCollectionModifier and TypeMethodDescriptionRenderingHints.values()
Returns aCollection
view of the values contained in thisRenderingHints
.Uses ofCollection injava.beans.beancontext
Subinterfaces ofCollection injava.beans.beancontextModifier and TypeInterfaceDescriptioninterface
Deprecated, for removal: This API element is subject to removal in a future version.interface
Deprecated, for removal: This API element is subject to removal in a future version.Classes injava.beans.beancontext that implementCollectionModifier and TypeClassDescriptionclass
Deprecated, for removal: This API element is subject to removal in a future version.class
Deprecated, for removal: This API element is subject to removal in a future version.Fields injava.beans.beancontext declared asCollectionModifier and TypeFieldDescriptionprotectedCollection
BeanContextMembershipEvent.children
Deprecated, for removal: This API element is subject to removal in a future version.The list of children affected by this event notification.Methods injava.beans.beancontext with parameters of typeCollectionModifier and TypeMethodDescriptionboolean
BeanContextSupport.addAll
(Collection c) Deprecated, for removal: This API element is subject to removal in a future version.add Collection to set of Children (Unsupported) implementations must synchronized on the hierarchy lock and "children" protected fieldboolean
BeanContextSupport.containsAll
(Collection c) Deprecated, for removal: This API element is subject to removal in a future version.Tests to see if all objects in the specifiedCollection
are children of thisBeanContext
.protected final void
BeanContextSupport.deserialize
(ObjectInputStream ois,Collection coll) Deprecated, for removal: This API element is subject to removal in a future version.used by readObject to deserialize a collection.boolean
BeanContextSupport.removeAll
(Collection c) Deprecated, for removal: This API element is subject to removal in a future version.remove all specified children (Unsupported) implementations must synchronized on the hierarchy lock and "children" protected fieldboolean
BeanContextSupport.retainAll
(Collection c) Deprecated, for removal: This API element is subject to removal in a future version.retain only specified children (Unsupported) implementations must synchronized on the hierarchy lock and "children" protected fieldprotected final void
BeanContextSupport.serialize
(ObjectOutputStream oos,Collection<?> coll) Deprecated, for removal: This API element is subject to removal in a future version.Used by writeObject to serialize a Collection.Constructors injava.beans.beancontext with parameters of typeCollectionModifierConstructorDescriptionBeanContextMembershipEvent
(BeanContext bc,Collection changes) Deprecated, for removal: This API element is subject to removal in a future version.Construct a BeanContextMembershipEventUses ofCollection injava.lang.classfile
Methods injava.lang.classfile with parameters of typeCollectionModifier and TypeMethodDescriptionstaticClassHierarchyResolver
ClassHierarchyResolver.of
(Collection<ClassDesc> interfaces,Map<ClassDesc,ClassDesc> classToSuperClass) Returns aClassHierarchyResolver
that extracts class hierarchy information from collections of class hierarchy metadata.Uses ofCollection injava.lang.classfile.attribute
Methods injava.lang.classfile.attribute with parameters of typeCollectionModifier and TypeMethodDescriptionModuleAttribute.ModuleAttributeBuilder.exports
(PackageDesc pkge,Collection<AccessFlag> exportsFlags,ModuleDesc... exportsToModules) Adds an exported package.staticModuleAttribute
ModuleAttribute.of
(ModuleEntry moduleName, int moduleFlags,Utf8Entry moduleVersion,Collection<ModuleRequireInfo> requires,Collection<ModuleExportInfo> exports,Collection<ModuleOpenInfo> opens,Collection<ClassEntry> uses,Collection<ModuleProvideInfo> provides) Returns aModule
attribute.staticModuleExportInfo
ModuleExportInfo.of
(PackageEntry exports,Collection<AccessFlag> exportFlags,ModuleEntry... exportsTo) Returns a module export description.staticModuleExportInfo
ModuleExportInfo.of
(PackageEntry exports,Collection<AccessFlag> exportFlags,List<ModuleEntry> exportsTo) Returns a module export description.staticModuleExportInfo
ModuleExportInfo.of
(PackageDesc exports,Collection<AccessFlag> exportFlags,ModuleDesc... exportsTo) Returns a module export description.staticModuleExportInfo
ModuleExportInfo.of
(PackageDesc exports,Collection<AccessFlag> exportFlags,List<ModuleDesc> exportsTo) Returns a module export description.staticModuleOpenInfo
ModuleOpenInfo.of
(PackageEntry opens,Collection<AccessFlag> opensFlags,ModuleEntry... opensTo) Returns a module open description.staticModuleOpenInfo
ModuleOpenInfo.of
(PackageEntry opens,Collection<AccessFlag> opensFlags,List<ModuleEntry> opensTo) Returns a module open description.staticModuleOpenInfo
ModuleOpenInfo.of
(PackageDesc opens,Collection<AccessFlag> opensFlags,ModuleDesc... opensTo) Returns a module open description.staticModuleOpenInfo
ModuleOpenInfo.of
(PackageDesc opens,Collection<AccessFlag> opensFlags,List<ModuleDesc> opensTo) Returns a module open description.staticModuleRequireInfo
ModuleRequireInfo.of
(ModuleEntry requires,Collection<AccessFlag> requiresFlags,Utf8Entry requiresVersion) Returns a module requirement description.staticModuleRequireInfo
ModuleRequireInfo.of
(ModuleDesc requires,Collection<AccessFlag> requiresFlags,String requiresVersion) Returns a module requirement description.ModuleAttribute.ModuleAttributeBuilder.opens
(PackageDesc pkge,Collection<AccessFlag> opensFlags,ModuleDesc... opensToModules) Opens a package.ModuleAttribute.ModuleAttributeBuilder.requires
(ModuleDesc module,Collection<AccessFlag> requiresFlags,String version) Adds a module requirement.Uses ofCollection injava.lang.module
Methods injava.lang.module with parameters of typeCollectionModifier and TypeMethodDescriptionConfiguration.resolve
(ModuleFinder before,ModuleFinder after,Collection<String> roots) Resolves a collection of root modules, with this configuration as its parent, to create a new configuration.staticConfiguration
Configuration.resolve
(ModuleFinder before,List<Configuration> parents,ModuleFinder after,Collection<String> roots) Resolves a collection of root modules to create a configuration.Configuration.resolveAndBind
(ModuleFinder before,ModuleFinder after,Collection<String> roots) Resolves a collection of root modules, with service binding, and with this configuration as its parent, to create a new configuration.staticConfiguration
Configuration.resolveAndBind
(ModuleFinder before,List<Configuration> parents,ModuleFinder after,Collection<String> roots) Resolves a collection of root modules, with service binding, to create configuration.Uses ofCollection injava.security
Methods injava.security that returnCollectionModifier and TypeMethodDescriptionProvider.values()
Returns an unmodifiable Collection view of the property values contained in thisProvider
.Uses ofCollection injava.security.cert
Methods injava.security.cert that returnCollectionModifier and TypeMethodDescriptionabstractCollection
<? extendsCertificate> CertificateFactorySpi.engineGenerateCertificates
(InputStream inStream) Returns a (possibly empty) collection view of the certificates read from the given input streaminStream
.abstractCollection
<? extendsCRL> CertificateFactorySpi.engineGenerateCRLs
(InputStream inStream) Returns a (possibly empty) collection view of the CRLs read from the given input streaminStream
.abstractCollection
<? extendsCertificate> CertStoreSpi.engineGetCertificates
(CertSelector selector) Returns aCollection
ofCertificate
s that match the specified selector.abstractCollection
<? extendsCRL> CertStoreSpi.engineGetCRLs
(CRLSelector selector) Returns aCollection
ofCRL
s that match the specified selector.finalCollection
<? extendsCertificate> CertificateFactory.generateCertificates
(InputStream inStream) Returns a (possibly empty) collection view of the certificates read from the given input streaminStream
.finalCollection
<? extendsCRL> CertificateFactory.generateCRLs
(InputStream inStream) Returns a (possibly empty) collection view of the CRLs read from the given input streaminStream
.finalCollection
<? extendsCertificate> CertStore.getCertificates
(CertSelector selector) Returns aCollection
ofCertificate
s that match the specified selector.Collection
<?> CollectionCertStoreParameters.getCollection()
Returns theCollection
from whichCertificate
s andCRL
s are retrieved.finalCollection
<? extendsCRL> CertStore.getCRLs
(CRLSelector selector) Returns aCollection
ofCRL
s that match the specified selector.Collection
<List<?>> X509Certificate.getIssuerAlternativeNames()
Gets an immutable collection of issuer alternative names from theIssuerAltName
extension, (OID = 2.5.29.18).X509CRLSelector.getIssuerNames()
Returns a copy of the issuerNames criterion.X509CRLSelector.getIssuers()
Returns the issuerNames criterion.Collection
<List<?>> X509CertSelector.getPathToNames()
Returns a copy of the pathToNames criterion.Collection
<List<?>> X509Certificate.getSubjectAlternativeNames()
Gets an immutable collection of subject alternative names from theSubjectAltName
extension, (OID = 2.5.29.17).Collection
<List<?>> X509CertSelector.getSubjectAlternativeNames()
Returns a copy of the subjectAlternativeNames criterion.Methods injava.security.cert with parameters of typeCollectionModifier and TypeMethodDescriptionabstract void
PKIXCertPathChecker.check
(Certificate cert,Collection<String> unresolvedCritExts) Performs the check(s) on the specified certificate using its internal state and removes any critical extensions that it processes from the specified collection of OID strings that represent the unresolved critical extensions.void
X509CRLSelector.setIssuerNames
(Collection<?> names) Note: useX509CRLSelector.setIssuers(Collection) instead or only specify the byte array form of distinguished names when using this method.void
X509CRLSelector.setIssuers
(Collection<X500Principal> issuers) Sets the issuerNames criterion.void
X509CertSelector.setPathToNames
(Collection<List<?>> names) Sets the pathToNames criterion.void
X509CertSelector.setSubjectAlternativeNames
(Collection<List<?>> names) Sets the subjectAlternativeNames criterion.Constructors injava.security.cert with parameters of typeCollectionModifierConstructorDescriptionCollectionCertStoreParameters
(Collection<?> collection) Creates an instance ofCollectionCertStoreParameters
which will allow certificates and CRLs to be retrieved from the specifiedCollection
.Uses ofCollection injava.util
Subinterfaces ofCollection injava.utilModifier and TypeInterfaceDescriptioninterface
Deque<E>
A linear collection that supports element insertion and removal at both ends.interface
List<E>
An ordered collection, where the user has precise control over where in the list each element is inserted.interface
NavigableSet<E>
ASortedSet
extended with navigation methods reporting closest matches for given search targets.interface
Queue<E>
A collection designed for holding elements prior to processing.interface
A collection that has a well-defined encounter order, that supports operations at both ends, and that is reversible.interface
SequencedSet<E>
A collection that is both aSequencedCollection
and aSet
.interface
Set<E>
A collection that contains no duplicate elements.interface
SortedSet<E>
ASet
that further provides atotal ordering on its elements.Classes injava.util that implementCollectionModifier and TypeClassDescriptionclass
This class provides a skeletal implementation of theCollection
interface, to minimize the effort required to implement this interface.class
AbstractList<E>
This class provides a skeletal implementation of theList
interface to minimize the effort required to implement this interface backed by a "random access" data store (such as an array).class
This class provides skeletal implementations of someQueue
operations.class
This class provides a skeletal implementation of theList
interface to minimize the effort required to implement this interface backed by a "sequential access" data store (such as a linked list).class
AbstractSet<E>
This class provides a skeletal implementation of theSet
interface to minimize the effort required to implement this interface.class
ArrayDeque<E>
Resizable-array implementation of theDeque
interface.class
ArrayList<E>
Resizable-array implementation of theList
interface.class
A specializedSet
implementation for use with enum types.class
HashSet<E>
This class implements theSet
interface, backed by a hash table (actually aHashMap
instance).class
Hash table and linked list implementation of theSet
interface, with well-defined encounter order.class
LinkedList<E>
Doubly-linked list implementation of theList
andDeque
interfaces.class
An unbounded priorityqueue based on a priority heap.class
Stack<E>
TheStack
class represents a last-in-first-out (LIFO) stack of objects.class
TreeSet<E>
ANavigableSet
implementation based on aTreeMap
.class
Vector<E>
TheVector
class implements a growable array of objects.Methods injava.util that returnCollectionModifier and TypeMethodDescriptionstatic <E> Collection
<E> Collections.checkedCollection
(Collection<E> c,Class<E> type) Returns a dynamically typesafe view of the specified collection.static <T> Collection
<T> Collections.synchronizedCollection
(Collection<T> c) Returns a synchronized (thread-safe) collection backed by the specified collection.static <T> Collection
<T> Collections.unmodifiableCollection
(Collection<? extends T> c) Returns anunmodifiable view of the specified collection.AbstractMap.values()
Returns aCollection
view of the values contained in this map.EnumMap.values()
Returns aCollection
view of the values contained in this map.HashMap.values()
Returns aCollection
view of the values contained in this map.Hashtable.values()
Returns aCollection
view of the values contained in this map.IdentityHashMap.values()
Returns aCollection
view of the values contained in this map.LinkedHashMap.values()
Returns aCollection
view of the values contained in this map.Map.values()
Returns aCollection
view of the values contained in this map.SortedMap.values()
Returns aCollection
view of the values contained in this map.TreeMap.values()
Returns aCollection
view of the values contained in this map.WeakHashMap.values()
Returns aCollection
view of the values contained in this map.Methods injava.util with parameters of typeCollectionModifier and TypeMethodDescriptionboolean
AbstractCollection.addAll
(Collection<? extendsE> c) Adds all of the elements in the specified collection to this collection (optional operation).boolean
AbstractList.addAll
(int index,Collection<? extendsE> c) Inserts all of the elements in the specified collection into this list at the specified position (optional operation).boolean
AbstractQueue.addAll
(Collection<? extendsE> c) Adds all of the elements in the specified collection to this queue.boolean
AbstractSequentialList.addAll
(int index,Collection<? extendsE> c) Inserts all of the elements in the specified collection into this list at the specified position (optional operation).boolean
ArrayDeque.addAll
(Collection<? extendsE> c) Adds all of the elements in the specified collection at the end of this deque, as if by callingArrayDeque.addLast(E)
on each one, in the order that they are returned by the collection's iterator.boolean
ArrayList.addAll
(int index,Collection<? extendsE> c) Inserts all of the elements in the specified collection into this list, starting at the specified position.boolean
ArrayList.addAll
(Collection<? extendsE> c) Appends all of the elements in the specified collection to the end of this list, in the order that they are returned by the specified collection's Iterator.boolean
Collection.addAll
(Collection<? extendsE> c) Adds all of the elements in the specified collection to this collection (optional operation).static <T> boolean
Collections.addAll
(Collection<? super T> c, T... elements) Adds all of the specified elements to the specified collection.boolean
Deque.addAll
(Collection<? extendsE> c) Adds all of the elements in the specified collection at the end of this deque, as if by callingDeque.addLast(E)
on each one, in the order that they are returned by the collection's iterator.boolean
LinkedList.addAll
(int index,Collection<? extendsE> c) Inserts all of the elements in the specified collection into this list, starting at the specified position.boolean
LinkedList.addAll
(Collection<? extendsE> c) Appends all of the elements in the specified collection to the end of this list, in the order that they are returned by the specified collection's iterator.boolean
List.addAll
(int index,Collection<? extendsE> c) Inserts all of the elements in the specified collection into this list at the specified position (optional operation).boolean
List.addAll
(Collection<? extendsE> c) Appends all of the elements in the specified collection to the end of this list, in the order that they are returned by the specified collection's iterator (optional operation).boolean
Set.addAll
(Collection<? extendsE> c) Adds all of the elements in the specified collection to this set if they're not already present (optional operation).boolean
TreeSet.addAll
(Collection<? extendsE> c) Adds all of the elements in the specified collection to this set.boolean
Vector.addAll
(int index,Collection<? extendsE> c) Inserts all of the elements in the specified Collection into this Vector at the specified position.boolean
Vector.addAll
(Collection<? extendsE> c) Appends all of the elements in the specified Collection to the end of this Vector, in the order that they are returned by the specified Collection's Iterator.static <E> Collection
<E> Collections.checkedCollection
(Collection<E> c,Class<E> type) Returns a dynamically typesafe view of the specified collection.boolean
AbstractCollection.containsAll
(Collection<?> c) Returnstrue
if this collection contains all of the elements in the specified collection.boolean
Collection.containsAll
(Collection<?> c) Returnstrue
if this collection contains all of the elements in the specified collection.boolean
List.containsAll
(Collection<?> c) Returnstrue
if this list contains all of the elements of the specified collection.boolean
Set.containsAll
(Collection<?> c) Returnstrue
if this set contains all of the elements of the specified collection.boolean
Vector.containsAll
(Collection<?> c) Returns true if this Vector contains all of the elements in the specified Collection.EnumSet.copyOf
(Collection<E> c) Creates an enum set initialized from the specified collection.static <E> List
<E> List.copyOf
(Collection<? extends E> coll) Returns anunmodifiable List containing the elements of the given Collection, in its iteration order.static <E> Set
<E> Set.copyOf
(Collection<? extends E> coll) Returns anunmodifiable Set containing the elements of the given Collection.static boolean
Collections.disjoint
(Collection<?> c1,Collection<?> c2) Returnstrue
if the two specified collections have no elements in common.static <T> Enumeration
<T> Collections.enumeration
(Collection<T> c) Returns an enumeration over the specified collection.Locale.filter
(List<Locale.LanguageRange> priorityList,Collection<Locale> locales) Returns a list of matchingLocale
instances using the filtering mechanism defined in RFC 4647.Locale.filter
(List<Locale.LanguageRange> priorityList,Collection<Locale> locales,Locale.FilteringMode mode) Returns a list of matchingLocale
instances using the filtering mechanism defined in RFC 4647.Locale.filterTags
(List<Locale.LanguageRange> priorityList,Collection<String> tags) Returns a list of matching languages tags using the basic filtering mechanism defined in RFC 4647.Locale.filterTags
(List<Locale.LanguageRange> priorityList,Collection<String> tags,Locale.FilteringMode mode) Returns a list of matching languages tags using the basic filtering mechanism defined in RFC 4647.static int
Collections.frequency
(Collection<?> c,Object o) Returns the number of elements in the specified collection equal to the specified object.staticLocale
Locale.lookup
(List<Locale.LanguageRange> priorityList,Collection<Locale> locales) Returns aLocale
instance for the best-matching language tag using the lookup mechanism defined in RFC 4647.staticString
Locale.lookupTag
(List<Locale.LanguageRange> priorityList,Collection<String> tags) Returns the best-matching language tag using the lookup mechanism defined in RFC 4647.static <T extendsObject &Comparable<? super T>>
TCollections.max
(Collection<? extends T> coll) Returns the maximum element of the given collection, according to thenatural ordering of its elements.static <T> T
Collections.max
(Collection<? extends T> coll,Comparator<? super T> comp) Returns the maximum element of the given collection, according to the order induced by the specified comparator.static <T extendsObject &Comparable<? super T>>
TCollections.min
(Collection<? extends T> coll) Returns the minimum element of the given collection, according to thenatural ordering of its elements.static <T> T
Collections.min
(Collection<? extends T> coll,Comparator<? super T> comp) Returns the minimum element of the given collection, according to the order induced by the specified comparator.boolean
AbstractCollection.removeAll
(Collection<?> c) Removes all of this collection's elements that are also contained in the specified collection (optional operation).boolean
AbstractSet.removeAll
(Collection<?> c) Removes from this set all of its elements that are contained in the specified collection (optional operation).boolean
ArrayDeque.removeAll
(Collection<?> c) boolean
ArrayList.removeAll
(Collection<?> c) Removes from this list all of its elements that are contained in the specified collection.boolean
Collection.removeAll
(Collection<?> c) Removes all of this collection's elements that are also contained in the specified collection (optional operation).boolean
List.removeAll
(Collection<?> c) Removes from this list all of its elements that are contained in the specified collection (optional operation).boolean
PriorityQueue.removeAll
(Collection<?> c) boolean
Set.removeAll
(Collection<?> c) Removes from this set all of its elements that are contained in the specified collection (optional operation).boolean
Vector.removeAll
(Collection<?> c) Removes from this Vector all of its elements that are contained in the specified Collection.boolean
AbstractCollection.retainAll
(Collection<?> c) Retains only the elements in this collection that are contained in the specified collection (optional operation).boolean
ArrayDeque.retainAll
(Collection<?> c) boolean
ArrayList.retainAll
(Collection<?> c) Retains only the elements in this list that are contained in the specified collection.boolean
Collection.retainAll
(Collection<?> c) Retains only the elements in this collection that are contained in the specified collection (optional operation).boolean
List.retainAll
(Collection<?> c) Retains only the elements in this list that are contained in the specified collection (optional operation).boolean
PriorityQueue.retainAll
(Collection<?> c) boolean
Set.retainAll
(Collection<?> c) Retains only the elements in this set that are contained in the specified collection (optional operation).boolean
Vector.retainAll
(Collection<?> c) Retains only the elements in this Vector that are contained in the specified Collection.static <T> Spliterator
<T> Spliterators.spliterator
(Collection<? extends T> c, int characteristics) static <T> Collection
<T> Collections.synchronizedCollection
(Collection<T> c) Returns a synchronized (thread-safe) collection backed by the specified collection.static <T> Collection
<T> Collections.unmodifiableCollection
(Collection<? extends T> c) Returns anunmodifiable view of the specified collection.Constructors injava.util with parameters of typeCollectionModifierConstructorDescriptionArrayDeque
(Collection<? extendsE> c) Constructs a deque containing the elements of the specified collection, in the order they are returned by the collection's iterator.ArrayList
(Collection<? extendsE> c) Constructs a list containing the elements of the specified collection, in the order they are returned by the collection's iterator.HashSet
(Collection<? extendsE> c) Constructs a new set containing the elements in the specified collection.LinkedHashSet
(Collection<? extendsE> c) Constructs a new linked hash set with the same elements as the specified collection.LinkedList
(Collection<? extendsE> c) Constructs a list containing the elements of the specified collection, in the order they are returned by the collection's iterator.PriorityQueue
(Collection<? extendsE> c) Creates aPriorityQueue
containing the elements in the specified collection.TreeSet
(Collection<? extendsE> c) Constructs a new tree set containing the elements in the specified collection, sorted according to thenatural ordering of its elements.Vector
(Collection<? extendsE> c) Constructs a vector containing the elements of the specified collection, in the order they are returned by the collection's iterator.Uses ofCollection injava.util.concurrent
Subinterfaces ofCollection injava.util.concurrentModifier and TypeInterfaceDescriptioninterface
ADeque
that additionally supports blocking operations that wait for the deque to become non-empty when retrieving an element, and wait for space to become available in the deque when storing an element.interface
AQueue
that additionally supports operations that wait for the queue to become non-empty when retrieving an element, and wait for space to become available in the queue when storing an element.interface
ABlockingQueue
in which producers may wait for consumers to receive elements.Classes injava.util.concurrent that implementCollectionModifier and TypeClassDescriptionclass
A boundedblocking queue backed by an array.static final class
A view of a ConcurrentHashMap as aSet
of keys, in which additions may optionally be enabled by mapping to a common value.class
An unbounded concurrentdeque based on linked nodes.class
An unbounded thread-safequeue based on linked nodes.class
A scalable concurrentNavigableSet
implementation based on aConcurrentSkipListMap
.class
A thread-safe variant ofArrayList
in which all mutative operations (add
,set
, and so on) are implemented by making a fresh copy of the underlying array.class
ASet
that uses an internalCopyOnWriteArrayList
for all of its operations.class
DelayQueue<E extendsDelayed>
An unboundedblocking queue ofDelayed
elements, in which an element generally becomes eligible for removal when its delay has expired.class
An optionally-boundedblocking deque based on linked nodes.class
An optionally-boundedblocking queue based on linked nodes.class
An unboundedTransferQueue
based on linked nodes.class
An unboundedblocking queue that uses the same ordering rules as classPriorityQueue
and supplies blocking retrieval operations.class
Ablocking queue in which each insert operation must wait for a corresponding remove operation by another thread, and vice versa.Methods injava.util.concurrent that returnCollectionModifier and TypeMethodDescriptionprotectedCollection
<Thread> Semaphore.getQueuedThreads()
Returns a collection containing threads that may be waiting to acquire.static <T extendsForkJoinTask<?>>
Collection<T> ForkJoinTask.invokeAll
(Collection<T> tasks) Forks all tasks in the specified collection, returning whenisDone
holds for each task or an (unchecked) exception is encountered, in which case the exception is rethrown.ConcurrentHashMap.values()
Returns aCollection
view of the values contained in this map.ConcurrentSkipListMap.values()
Returns aCollection
view of the values contained in this map.Methods injava.util.concurrent with parameters of typeCollectionModifier and TypeMethodDescriptionboolean
ConcurrentHashMap.KeySetView.addAll
(Collection<? extendsK> c) Adds all of the elements in the specified collection to this set, as if by callingConcurrentHashMap.KeySetView.add(K)
on each one.boolean
ConcurrentLinkedDeque.addAll
(Collection<? extendsE> c) Appends all of the elements in the specified collection to the end of this deque, in the order that they are returned by the specified collection's iterator.boolean
ConcurrentLinkedQueue.addAll
(Collection<? extendsE> c) Appends all of the elements in the specified collection to the end of this queue, in the order that they are returned by the specified collection's iterator.boolean
CopyOnWriteArrayList.addAll
(int index,Collection<? extendsE> c) Inserts all of the elements in the specified collection into this list, starting at the specified position.boolean
CopyOnWriteArrayList.addAll
(Collection<? extendsE> c) Appends all of the elements in the specified collection to the end of this list, in the order that they are returned by the specified collection's iterator.boolean
CopyOnWriteArraySet.addAll
(Collection<? extendsE> c) Adds all of the elements in the specified collection to this set if they're not already present.boolean
LinkedBlockingDeque.addAll
(Collection<? extendsE> c) Appends all of the elements in the specified collection to the end of this deque, in the order that they are returned by the specified collection's iterator.int
CopyOnWriteArrayList.addAllAbsent
(Collection<? extendsE> c) Appends all of the elements in the specified collection that are not already contained in this list, to the end of this list, in the order that they are returned by the specified collection's iterator.boolean
CopyOnWriteArrayList.containsAll
(Collection<?> c) Returnstrue
if this list contains all of the elements of the specified collection.boolean
CopyOnWriteArraySet.containsAll
(Collection<?> c) Returnstrue
if this set contains all of the elements of the specified collection.boolean
SynchronousQueue.containsAll
(Collection<?> c) Returnsfalse
unless the given collection is empty.protected int
ForkJoinPool.drainTasksTo
(Collection<? superForkJoinTask<?>> c) Removes all available unexecuted submitted and forked tasks from scheduling queues and adds them to the given collection, without altering their execution status.int
ArrayBlockingQueue.drainTo
(Collection<? superE> c) int
ArrayBlockingQueue.drainTo
(Collection<? superE> c, int maxElements) int
BlockingQueue.drainTo
(Collection<? superE> c) Removes all available elements from this queue and adds them to the given collection.int
BlockingQueue.drainTo
(Collection<? superE> c, int maxElements) Removes at most the given number of available elements from this queue and adds them to the given collection.int
DelayQueue.drainTo
(Collection<? superE> c) int
DelayQueue.drainTo
(Collection<? superE> c, int maxElements) int
LinkedBlockingDeque.drainTo
(Collection<? superE> c) int
LinkedBlockingDeque.drainTo
(Collection<? superE> c, int maxElements) int
LinkedBlockingQueue.drainTo
(Collection<? superE> c) int
LinkedBlockingQueue.drainTo
(Collection<? superE> c, int maxElements) int
LinkedTransferQueue.drainTo
(Collection<? superE> c) int
LinkedTransferQueue.drainTo
(Collection<? superE> c, int maxElements) int
PriorityBlockingQueue.drainTo
(Collection<? superE> c) int
PriorityBlockingQueue.drainTo
(Collection<? superE> c, int maxElements) int
SynchronousQueue.drainTo
(Collection<? superE> c) int
SynchronousQueue.drainTo
(Collection<? superE> c, int maxElements) AbstractExecutorService.invokeAll
(Collection<? extendsCallable<T>> tasks) AbstractExecutorService.invokeAll
(Collection<? extendsCallable<T>> tasks, long timeout,TimeUnit unit) ExecutorService.invokeAll
(Collection<? extendsCallable<T>> tasks) Executes the given tasks, returning a list of Futures holding their status and results when all complete.ExecutorService.invokeAll
(Collection<? extendsCallable<T>> tasks, long timeout,TimeUnit unit) Executes the given tasks, returning a list of Futures holding their status and results when all complete or the timeout expires, whichever happens first.static <T extendsForkJoinTask<?>>
Collection<T> ForkJoinTask.invokeAll
(Collection<T> tasks) Forks all tasks in the specified collection, returning whenisDone
holds for each task or an (unchecked) exception is encountered, in which case the exception is rethrown.ForkJoinPool.invokeAllUninterruptibly
(Collection<? extendsCallable<T>> tasks) Uninterrupible version ofinvokeAll
.<T> T
AbstractExecutorService.invokeAny
(Collection<? extendsCallable<T>> tasks) <T> T
AbstractExecutorService.invokeAny
(Collection<? extendsCallable<T>> tasks, long timeout,TimeUnit unit) <T> T
ExecutorService.invokeAny
(Collection<? extendsCallable<T>> tasks) Executes the given tasks, returning the result of one that has completed successfully (i.e., without throwing an exception), if any do.<T> T
ExecutorService.invokeAny
(Collection<? extendsCallable<T>> tasks, long timeout,TimeUnit unit) Executes the given tasks, returning the result of one that has completed successfully (i.e., without throwing an exception), if any do before the given timeout elapses.boolean
ArrayBlockingQueue.removeAll
(Collection<?> c) boolean
ConcurrentLinkedDeque.removeAll
(Collection<?> c) boolean
ConcurrentLinkedQueue.removeAll
(Collection<?> c) boolean
ConcurrentSkipListSet.removeAll
(Collection<?> c) Removes from this set all of its elements that are contained in the specified collection.boolean
CopyOnWriteArrayList.removeAll
(Collection<?> c) Removes from this list all of its elements that are contained in the specified collection.boolean
CopyOnWriteArraySet.removeAll
(Collection<?> c) Removes from this set all of its elements that are contained in the specified collection.boolean
LinkedBlockingDeque.removeAll
(Collection<?> c) boolean
LinkedBlockingQueue.removeAll
(Collection<?> c) boolean
LinkedTransferQueue.removeAll
(Collection<?> c) boolean
PriorityBlockingQueue.removeAll
(Collection<?> c) boolean
SynchronousQueue.removeAll
(Collection<?> c) Always returnsfalse
.boolean
ArrayBlockingQueue.retainAll
(Collection<?> c) boolean
ConcurrentLinkedDeque.retainAll
(Collection<?> c) boolean
ConcurrentLinkedQueue.retainAll
(Collection<?> c) boolean
CopyOnWriteArrayList.retainAll
(Collection<?> c) Retains only the elements in this list that are contained in the specified collection.boolean
CopyOnWriteArraySet.retainAll
(Collection<?> c) Retains only the elements in this set that are contained in the specified collection.boolean
LinkedBlockingDeque.retainAll
(Collection<?> c) boolean
LinkedBlockingQueue.retainAll
(Collection<?> c) boolean
LinkedTransferQueue.retainAll
(Collection<?> c) boolean
PriorityBlockingQueue.retainAll
(Collection<?> c) boolean
SynchronousQueue.retainAll
(Collection<?> c) Always returnsfalse
.Constructors injava.util.concurrent with parameters of typeCollectionModifierConstructorDescriptionArrayBlockingQueue
(int capacity, boolean fair,Collection<? extendsE> c) Creates anArrayBlockingQueue
with the given (fixed) capacity, the specified access policy and initially containing the elements of the given collection, added in traversal order of the collection's iterator.ConcurrentLinkedDeque
(Collection<? extendsE> c) Constructs a deque initially containing the elements of the given collection, added in traversal order of the collection's iterator.ConcurrentLinkedQueue
(Collection<? extendsE> c) Creates aConcurrentLinkedQueue
initially containing the elements of the given collection, added in traversal order of the collection's iterator.ConcurrentSkipListSet
(Collection<? extendsE> c) Constructs a new set containing the elements in the specified collection, that orders its elements according to theirnatural ordering.CopyOnWriteArrayList
(Collection<? extendsE> c) Creates a list containing the elements of the specified collection, in the order they are returned by the collection's iterator.CopyOnWriteArraySet
(Collection<? extendsE> c) Creates a set containing all of the elements of the specified collection.DelayQueue
(Collection<? extendsE> c) Creates aDelayQueue
initially containing the elements of the given collection ofDelayed
instances.LinkedBlockingDeque
(Collection<? extendsE> c) Creates aLinkedBlockingDeque
with a capacity ofInteger.MAX_VALUE
, initially containing the elements of the given collection, added in traversal order of the collection's iterator.LinkedBlockingQueue
(Collection<? extendsE> c) Creates aLinkedBlockingQueue
with a capacity ofInteger.MAX_VALUE
, initially containing the elements of the given collection, added in traversal order of the collection's iterator.LinkedTransferQueue
(Collection<? extendsE> c) Creates aLinkedTransferQueue
initially containing the elements of the given collection, added in traversal order of the collection's iterator.PriorityBlockingQueue
(Collection<? extendsE> c) Creates aPriorityBlockingQueue
containing the elements in the specified collection.Uses ofCollection injava.util.concurrent.locks
Methods injava.util.concurrent.locks that returnCollectionModifier and TypeMethodDescriptionfinalCollection
<Thread> AbstractQueuedLongSynchronizer.getExclusiveQueuedThreads()
Returns a collection containing threads that may be waiting to acquire in exclusive mode.finalCollection
<Thread> AbstractQueuedSynchronizer.getExclusiveQueuedThreads()
Returns a collection containing threads that may be waiting to acquire in exclusive mode.protectedCollection
<Thread> ReentrantReadWriteLock.getQueuedReaderThreads()
Returns a collection containing threads that may be waiting to acquire the read lock.finalCollection
<Thread> AbstractQueuedLongSynchronizer.getQueuedThreads()
Returns a collection containing threads that may be waiting to acquire.finalCollection
<Thread> AbstractQueuedSynchronizer.getQueuedThreads()
Returns a collection containing threads that may be waiting to acquire.protectedCollection
<Thread> ReentrantLock.getQueuedThreads()
Returns a collection containing threads that may be waiting to acquire this lock.protectedCollection
<Thread> ReentrantReadWriteLock.getQueuedThreads()
Returns a collection containing threads that may be waiting to acquire either the read or write lock.protectedCollection
<Thread> ReentrantReadWriteLock.getQueuedWriterThreads()
Returns a collection containing threads that may be waiting to acquire the write lock.finalCollection
<Thread> AbstractQueuedLongSynchronizer.getSharedQueuedThreads()
Returns a collection containing threads that may be waiting to acquire in shared mode.finalCollection
<Thread> AbstractQueuedSynchronizer.getSharedQueuedThreads()
Returns a collection containing threads that may be waiting to acquire in shared mode.protected finalCollection
<Thread> AbstractQueuedLongSynchronizer.ConditionObject.getWaitingThreads()
Returns a collection containing those threads that may be waiting on this Condition.finalCollection
<Thread> AbstractQueuedLongSynchronizer.getWaitingThreads
(AbstractQueuedLongSynchronizer.ConditionObject condition) Returns a collection containing those threads that may be waiting on the given condition associated with this synchronizer.protected finalCollection
<Thread> AbstractQueuedSynchronizer.ConditionObject.getWaitingThreads()
Returns a collection containing those threads that may be waiting on this Condition.finalCollection
<Thread> AbstractQueuedSynchronizer.getWaitingThreads
(AbstractQueuedSynchronizer.ConditionObject condition) Returns a collection containing those threads that may be waiting on the given condition associated with this synchronizer.protectedCollection
<Thread> ReentrantLock.getWaitingThreads
(Condition condition) Returns a collection containing those threads that may be waiting on the given condition associated with this lock.protectedCollection
<Thread> ReentrantReadWriteLock.getWaitingThreads
(Condition condition) Returns a collection containing those threads that may be waiting on the given condition associated with the write lock.Uses ofCollection injava.util.jar
Methods injava.util.jar that returnCollectionModifier and TypeMethodDescriptionAttributes.values()
Returns a Collection view of the attribute values contained in this Map.Uses ofCollection injava.util.stream
Methods injava.util.stream with type parameters of typeCollectionModifier and TypeMethodDescriptionstatic <T, C extendsCollection<T>>
Collector<T, ?, C> Collectors.toCollection
(Supplier<C> collectionFactory) Returns aCollector
that accumulates the input elements into a newCollection
, in encounter order.Uses ofCollection injavax.management
Classes injavax.management that implementCollectionModifier and TypeClassDescriptionclass
Represents a list of values for attributes of an MBean.Methods injavax.management with parameters of typeCollectionModifier and TypeMethodDescriptionboolean
AttributeList.addAll
(int index,Collection<?> c) Inserts all of the elements in the specified collection into this list, starting at the specified position.boolean
AttributeList.addAll
(Collection<?> c) Appends all of the elements in the specified collection to the end of this list, in the order that they are returned by the specified collection's Iterator.Uses ofCollection injavax.management.openmbean
Methods injavax.management.openmbean that returnCollectionModifier and TypeMethodDescriptionCollection
<?> CompositeData.values()
Returns an unmodifiable Collection view of the item values contained in thisCompositeData
instance.Collection
<?> CompositeDataSupport.values()
Returns an unmodifiable Collection view of the item values contained in thisCompositeData
instance.Collection
<?> TabularData.values()
Returns a collection view of theCompositeData
values (ie the rows) contained in thisTabularData
instance.TabularDataSupport.values()
Returns a collection view of the rows contained in thisTabularDataSupport
instance.Uses ofCollection injavax.management.relation
Classes injavax.management.relation that implementCollectionModifier and TypeClassDescriptionclass
A RoleList represents a list of roles (Role objects).class
A RoleUnresolvedList represents a list of RoleUnresolved objects, representing roles not retrieved from a relation due to a problem encountered when trying to access (read or write) the roles.Uses ofCollection injavax.net.ssl
Methods injavax.net.ssl that returnCollectionModifier and TypeMethodDescriptionfinalCollection
<SNIMatcher> SSLParameters.getSNIMatchers()
Returns aCollection
containing allSNIMatcher
s of the Server Name Indication (SNI) parameter, or null if none has been set.Methods injavax.net.ssl with parameters of typeCollectionModifier and TypeMethodDescriptionfinal void
SSLParameters.setSNIMatchers
(Collection<SNIMatcher> matchers) Sets theSNIMatcher
s of the Server Name Indication (SNI) parameter.Uses ofCollection injavax.print.attribute.standard
Classes injavax.print.attribute.standard that implementCollectionModifier and TypeClassDescriptionfinal class
ClassJobStateReasons
is a printing attribute class, a set of enumeration values, that provides additional information about the job's current state, i.e., information that augments the value of the job'sJobState
attribute.Constructors injavax.print.attribute.standard with parameters of typeCollectionModifierConstructorDescriptionJobStateReasons
(Collection<JobStateReason> collection) Construct a new job state reasons attribute that contains the sameJobStateReason
objects as the given collection.Uses ofCollection injavax.script
Methods injavax.script that returnCollectionModifier and TypeMethodDescriptionSimpleBindings.values()
Returns aCollection
view of the values contained in this map.Uses ofCollection injavax.sql.rowset
Methods injavax.sql.rowset that returnCollectionModifier and TypeMethodDescriptionCollection
<?> JoinRowSet.getRowSets()
Returns aCollection
object containing theRowSet
objects that have been added to thisJoinRowSet
object.Collection
<?> CachedRowSet.toCollection()
Converts thisCachedRowSet
object to aCollection
object that contains all of thisCachedRowSet
object's data.Collection
<?> CachedRowSet.toCollection
(int column) Converts the designated column in thisCachedRowSet
object to aCollection
object.Collection
<?> CachedRowSet.toCollection
(String column) Converts the designated column in thisCachedRowSet
object to aCollection
object.Uses ofCollection injavax.swing
Methods injavax.swing with parameters of typeCollectionModifier and TypeMethodDescriptionvoid
DefaultComboBoxModel.addAll
(int index,Collection<? extendsE> c) Adds all of the elements present in the collection, starting from the specified index.void
DefaultComboBoxModel.addAll
(Collection<? extendsE> c) Adds all of the elements present in the collection.void
DefaultListModel.addAll
(int index,Collection<? extendsE> c) Adds all of the elements present in the collection, starting from the specified index.void
DefaultListModel.addAll
(Collection<? extendsE> c) Adds all of the elements present in the collection to the list.Uses ofCollection injavax.tools
Methods injavax.tools with parameters of typeCollectionModifier and TypeMethodDescriptiondefaultIterable
<? extendsJavaFileObject> StandardJavaFileManager.getJavaFileObjectsFromPaths
(Collection<? extendsPath> paths) Returns file objects representing the given paths.default void
StandardJavaFileManager.setLocationForModule
(JavaFileManager.Location location,String moduleName,Collection<? extendsPath> paths) Associates the given search path with the given module and location, which must be a module-oriented or output location.default void
StandardJavaFileManager.setLocationFromPaths
(JavaFileManager.Location location,Collection<? extendsPath> paths) Associates the given search path with the given location.Uses ofCollection injdk.jshell
Methods injdk.jshell that returnCollectionModifier and TypeMethodDescriptionabstractCollection
<Snippet> SourceCodeAnalysis.dependents
(Snippet snippet) Returns a collection ofSnippet
s which might need updating if the givenSnippet
is updated.