Uses of Interface
java.util.Set
Package
Description
Contains all of the classes for creating user interfaces and for painting
graphics and images.
Provides classes and interface relating to fonts.
Provides classes that are fundamental to the design of the Java
programming language.
Provides classfile parsing, generation, and transformation library.
Provides interfaces describing classfile attributes for the
java.lang.classfile
PREVIEW library.Provides services that allow Java programming language agents to instrument
programs running on the Java Virtual Machine (JVM).
Provides the management interfaces for monitoring and management of the
Java virtual machine and other components in the Java runtime.
Classes to support module descriptors and creating configurations of modules
by means of resolution and service binding.
Provides classes and interfaces for obtaining reflective information about
classes and objects.
Provides the classes for implementing networking applications.
Defines channels, which represent connections to entities that are capable of
performing I/O operations, such as files and sockets; defines selectors, for
multiplexed, non-blocking I/O operations.
Service-provider classes for the
java.nio.channels
package.Defines charsets, decoders, and encoders, for translating between
bytes and Unicode characters.
Defines interfaces and classes for the Java virtual machine to access files,
file attributes, and file systems.
Interfaces and classes providing access to file and file system attributes.
Service-provider classes for the
java.nio.file
package.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.
Provides classes and interfaces for handling text, dates, numbers,
and messages in a manner independent of natural languages.
The main API for dates, times, instants, and durations.
Generic API for calendar systems other than the default ISO.
Provides classes to print and parse dates and times.
Support for time-zones and their rules.
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.
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.
Facilities for declaring annotation processors and for
allowing annotation processors to communicate with an annotation processing
tool environment.
The main package of the Java Image I/O API.
Interfaces used to model elements of the Java programming language.
Utilities to assist in the processing of
program elements and
types.
Provides the core classes for the Java Management Extensions.
Provides the classes which implement advanced dynamic
loading.
Provides the open data types and Open MBean descriptor classes.
The RMI connector is a connector for the JMX Remote API that
uses RMI to transmit client requests to a remote MBean server.
Package
javax.print.attribute.standard
contains classes for specific
printing attributes.The scripting API consists of interfaces and classes that define
Java Scripting Engines and provides
a framework for their use in Java applications.
This package provides a framework for authentication and
authorization.
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.
-
Uses of Set in java.awt
Modifier and TypeMethodDescriptionRenderingHints.entrySet()
Returns aSet
view of the mappings contained in thisRenderingHints
.KeyboardFocusManager.getDefaultFocusTraversalKeys
(int id) Returns a Set of default focus traversal keys for a given traversal operation.Component.getFocusTraversalKeys
(int id) Returns the Set of focus traversal keys for a given traversal operation for this Component.Container.getFocusTraversalKeys
(int id) Returns the Set of focus traversal keys for a given traversal operation for this Container.Window.getFocusTraversalKeys
(int id) Gets a focus traversal key for this Window.RenderingHints.keySet()
Returns aSet
view of the Keys contained in thisRenderingHints
.Modifier and TypeMethodDescriptionvoid
KeyboardFocusManager.setDefaultFocusTraversalKeys
(int id, Set<? extends AWTKeyStroke> keystrokes) Sets the default focus traversal keys for a given traversal operation.void
Component.setFocusTraversalKeys
(int id, Set<? extends AWTKeyStroke> keystrokes) Sets the focus traversal keys for a given traversal operation for this Component.void
Container.setFocusTraversalKeys
(int id, Set<? extends AWTKeyStroke> keystrokes) Sets the focus traversal keys for a given traversal operation for this Container. -
Uses of Set in java.awt.font
Modifier and TypeMethodDescriptionNumericShaper.getRangeSet()
Returns aSet
representing all the Unicode ranges in thisNumericShaper
that will be shaped.Modifier and TypeMethodDescriptionstatic NumericShaper
NumericShaper.getContextualShaper
(Set<NumericShaper.Range> ranges) Returns a contextual shaper for the provided Unicode range(s).static NumericShaper
NumericShaper.getContextualShaper
(Set<NumericShaper.Range> ranges, NumericShaper.Range defaultContext) Returns a contextual shaper for the provided Unicode range(s). -
Uses of Set in java.lang
Modifier and TypeMethodDescriptionClass.accessFlags()
Returns an unmodifiable set of the access flags for this class, possibly empty.Module.getPackages()
Returns the set of package names for the packages in this module.ModuleLayer.modules()
Returns an unmodifiable set of the modules in this layer.Modifier and TypeMethodDescriptionstatic StackWalker
StackWalker.getInstance
(Set<StackWalker.Option> options) Returns aStackWalker
instance with the givenoptions
specifying the stack frame information it can access.static StackWalker
StackWalker.getInstance
(Set<StackWalker.Option> options, int estimateDepth) Returns aStackWalker
instance with the givenoptions
specifying the stack frame information it can access. -
Uses of Set in java.lang.classfilePREVIEW
Modifier and TypeFieldDescriptionstatic final Set
<AttributeMapperPREVIEW<?>> Attributes.PREDEFINED_ATTRIBUTES
All standard attribute mappers. -
Uses of Set in java.lang.classfile.attributePREVIEW
Modifier and TypeMethodDescriptiondefault Set
<AccessFlag> ModuleExportInfo.exportsFlags()
Returns the flags associated with this export declaration, as a set of flag values.default Set
<AccessFlag> InnerClassInfo.flags()
Returns a set of flag enums denoting access permissions and properties of the inner class.default Set
<AccessFlag> MethodParameterInfo.flags()
Parameter access flags for this parameter.default Set
<AccessFlag> ModuleAttribute.moduleFlags()
Returns the the module flags of the module, as a set of enum constants.default Set
<AccessFlag> ModuleOpenInfo.opensFlags()
Returns the access flags.default Set
<AccessFlag> ModuleRequireInfo.requiresFlags()
Returns the access flags. -
Uses of Set in java.lang.instrument
Modifier and TypeMethodDescriptionvoid
Instrumentation.redefineModule
(Module module, Set<Module> extraReads, Map<String, Set<Module>> extraExports, Map<String, Set<Module>> extraOpens, Set<Class<?>> extraUses, Map<Class<?>, List<Class<?>>> extraProvides) Redefine a module to expand the set of modules that it reads, the set of packages that it exports or opens, or the services that it uses or provides.Modifier and TypeMethodDescriptionvoid
Instrumentation.redefineModule
(Module module, Set<Module> extraReads, Map<String, Set<Module>> extraExports, Map<String, Set<Module>> extraOpens, Set<Class<?>> extraUses, Map<Class<?>, List<Class<?>>> extraProvides) Redefine a module to expand the set of modules that it reads, the set of packages that it exports or opens, or the services that it uses or provides. -
Uses of Set in java.lang.management
Modifier and TypeMethodDescriptionstatic Set
<Class<? extends PlatformManagedObject>> ManagementFactory.getPlatformManagementInterfaces()
Returns the set ofClass
objects, subinterface ofPlatformManagedObject
, representing all management interfaces for monitoring and managing the Java platform. -
Uses of Set in java.lang.module
Modifier and TypeMethodDescriptionModuleDescriptor.accessFlags()
Returns the set of the module flags.ModuleDescriptor.Exports.accessFlags()
Returns the set of the module export flags for this module descriptor.ModuleDescriptor.Opens.accessFlags()
Returns the set of the module opens flags.ModuleDescriptor.Requires.accessFlags()
Returns the set of the module requires flags.ModuleDescriptor.exports()
Returns the set ofExports
objects representing the exported packages.ModuleFinder.findAll()
Returns the set of all module references that this finder can locate.ModuleDescriptor.Exports.modifiers()
Returns the set of modifiers.ModuleDescriptor.modifiers()
Returns the set of module modifiers.ModuleDescriptor.Opens.modifiers()
Returns the set of modifiers.ModuleDescriptor.Requires.modifiers()
Returns the set of modifiers.Configuration.modules()
Returns an unmodifiable set of the resolved modules in this configuration.ModuleDescriptor.opens()
Returns the set ofOpens
objects representing the open packages.ModuleDescriptor.packages()
Returns the set of packages in the module.ModuleDescriptor.provides()
Returns the set ofProvides
objects representing the services that the module provides.ResolvedModule.reads()
Returns the set of resolved modules that this resolved module reads.ModuleDescriptor.requires()
Returns the set ofRequires
objects representing the module dependences.ModuleDescriptor.Exports.targets()
For a qualified export, returns the non-empty and immutable set of the module names to which the package is exported.ModuleDescriptor.Opens.targets()
For a qualifiedOpens
, returns the non-empty and immutable set of the module names to which the package is open.ModuleDescriptor.uses()
Returns the set of service dependences.Modifier and TypeMethodDescriptionAdds an exported package.ModuleDescriptor.Builder.exports
(Set<ModuleDescriptor.Exports.Modifier> ms, String pn) Adds an exported package with the given (and possibly empty) set of modifiers.ModuleDescriptor.Builder.exports
(Set<ModuleDescriptor.Exports.Modifier> ms, String pn, Set<String> targets) Adds an exported package with the given (and possibly empty) set of modifiers.static ModuleDescriptor.Builder
ModuleDescriptor.newModule
(String name, Set<ModuleDescriptor.Modifier> ms) Instantiates a builder to build a module descriptor.Adds an open package.ModuleDescriptor.Builder.opens
(Set<ModuleDescriptor.Opens.Modifier> ms, String pn) Adds an open package with the given (and possibly empty) set of modifiers.ModuleDescriptor.Builder.opens
(Set<ModuleDescriptor.Opens.Modifier> ms, String pn, Set<String> targets) Adds an open package with the given (and possibly empty) set of modifiers.Adds packages to the module.ModuleDescriptor.Builder.requires
(Set<ModuleDescriptor.Requires.Modifier> ms, String mn) Adds a dependence on a module with the given (and possibly empty) set of modifiers.ModuleDescriptor.Builder.requires
(Set<ModuleDescriptor.Requires.Modifier> ms, String mn, ModuleDescriptor.Version compiledVersion) Adds a dependence on a module with the given (and possibly empty) set of modifiers.Modifier and TypeMethodDescriptionstatic ModuleDescriptor
ModuleDescriptor.read
(InputStream in, Supplier<Set<String>> packageFinder) Reads the binary form of a module declaration from an input stream as a module descriptor.static ModuleDescriptor
ModuleDescriptor.read
(ByteBuffer bb, Supplier<Set<String>> packageFinder) Reads the binary form of a module declaration from a byte buffer as a module descriptor. -
Uses of Set in java.lang.reflect
Modifier and TypeMethodDescriptionExecutable.accessFlags()
Returns an unmodifiable set of the access flags for the executable represented by this object, possibly empty.Field.accessFlags()
Returns an unmodifiable set of the access flags for this field, possibly empty.default Set
<AccessFlag> Member.accessFlags()
Returns an unmodifiable set of the access flags for this member, possibly empty.Parameter.accessFlags()
Returns an unmodifiable set of the access flags for the parameter represented by this object, possibly empty.AccessFlag.locations()
Returns kinds of constructs the flag can be applied to in the latest class file format version.AccessFlag.locations
(ClassFileFormatVersion cffv) Returns kinds of constructs the flag can be applied to in the given class file format version.static Set
<AccessFlag> AccessFlag.maskToAccessFlags
(int mask, AccessFlag.Location location) Returns an unmodifiable set of access flags for the given mask value appropriate for the location in question. -
Uses of Set in java.net
Modifier and TypeMethodDescriptionSet
<SocketOption<?>> DatagramSocket.supportedOptions()
Returns a set of the socket options supported by this socket.protected Set
<SocketOption<?>> DatagramSocketImpl.supportedOptions()
Returns a set of SocketOptions supported by this impl and by this impl's socket (DatagramSocket or MulticastSocket)Set
<SocketOption<?>> ServerSocket.supportedOptions()
Returns a set of the socket options supported by this server socket.Set
<SocketOption<?>> Socket.supportedOptions()
Returns a set of the socket options supported by this socket.protected Set
<SocketOption<?>> SocketImpl.supportedOptions()
Returns a set of SocketOptions supported by this impl and by this impl's socket (Socket or ServerSocket) -
Uses of Set in java.nio.channels
Modifier and TypeMethodDescriptionabstract Set
<SelectionKey> Selector.keys()
Returns this selector's key set.abstract Set
<SelectionKey> Selector.selectedKeys()
Returns this selector's selected-key set.Set
<SocketOption<?>> NetworkChannel.supportedOptions()
Returns a set of the socket options supported by this channel.Modifier and TypeMethodDescriptionstatic AsynchronousFileChannel
AsynchronousFileChannel.open
(Path file, Set<? extends OpenOption> options, ExecutorService executor, FileAttribute<?>... attrs) Opens or creates a file for reading and/or writing, returning an asynchronous file channel to access the file.static FileChannel
FileChannel.open
(Path path, Set<? extends OpenOption> options, FileAttribute<?>... attrs) Opens or creates a file, returning a file channel to access the file. -
Uses of Set in java.nio.channels.spi
Modifier and TypeMethodDescriptionprotected final Set
<SelectionKey> AbstractSelector.cancelledKeys()
Retrieves this selector's cancelled-key set. -
Uses of Set in java.nio.charset
-
Uses of Set in java.nio.file
Modifier and TypeMethodDescriptionstatic Set
<PosixFilePermission> Files.getPosixFilePermissions
(Path path, LinkOption... options) Returns a file's POSIX file permissions.FileSystem.supportedFileAttributeViews()
Returns the set of thenames
of the file attribute views supported by thisFileSystem
.Modifier and TypeMethodDescriptionstatic SeekableByteChannel
Files.newByteChannel
(Path path, Set<? extends OpenOption> options, FileAttribute<?>... attrs) Opens or creates a file, returning a seekable byte channel to access the file.SecureDirectoryStream.newByteChannel
(T path, Set<? extends OpenOption> options, FileAttribute<?>... attrs) Opens or creates a file in this directory, returning a seekable byte channel to access the file.static Path
Files.setPosixFilePermissions
(Path path, Set<PosixFilePermission> perms) Sets a file's POSIX permissions.static Path
Files.walkFileTree
(Path start, Set<FileVisitOption> options, int maxDepth, FileVisitor<? super Path> visitor) Walks a file tree. -
Uses of Set in java.nio.file.attribute
Modifier and TypeMethodDescriptionAclEntry.flags()
Returns a copy of the flags component.static Set
<PosixFilePermission> PosixFilePermissions.fromString
(String perms) Returns the set of permissions corresponding to a givenString
representation.AclEntry.permissions()
Returns a copy of the permissions component.PosixFileAttributes.permissions()
Returns the permissions of the file.Modifier and TypeMethodDescriptionstatic FileAttribute
<Set<PosixFilePermission>> PosixFilePermissions.asFileAttribute
(Set<PosixFilePermission> perms) Creates aFileAttribute
, encapsulating a copy of the given file permissions, suitable for passing to thecreateFile
orcreateDirectory
methods.Modifier and TypeMethodDescriptionstatic FileAttribute
<Set<PosixFilePermission>> PosixFilePermissions.asFileAttribute
(Set<PosixFilePermission> perms) Creates aFileAttribute
, encapsulating a copy of the given file permissions, suitable for passing to thecreateFile
orcreateDirectory
methods.AclEntry.Builder.setFlags
(Set<AclEntryFlag> flags) Sets the flags component of this builder.AclEntry.Builder.setPermissions
(Set<AclEntryPermission> perms) Sets the permissions component of this builder.void
PosixFileAttributeView.setPermissions
(Set<PosixFilePermission> perms) Updates the file permissions.static String
PosixFilePermissions.toString
(Set<PosixFilePermission> perms) Returns theString
representation of a set of permissions. -
Uses of Set in java.nio.file.spi
Modifier and TypeMethodDescriptionFileSystemProvider.newAsynchronousFileChannel
(Path path, Set<? extends OpenOption> options, ExecutorService executor, FileAttribute<?>... attrs) Opens or creates a file for reading and/or writing, returning an asynchronous file channel to access the file.abstract SeekableByteChannel
FileSystemProvider.newByteChannel
(Path path, Set<? extends OpenOption> options, FileAttribute<?>... attrs) Opens or creates a file, returning a seekable byte channel to access the file.FileSystemProvider.newFileChannel
(Path path, Set<? extends OpenOption> options, FileAttribute<?>... attrs) Opens or creates a file for reading and/or writing, returning a file channel to access the file. -
Uses of Set in java.security
Modifier and TypeMethodDescriptionKeyStoreSpi.engineGetAttributes
(String alias) Retrieves the attributes associated with the given alias.Provider.entrySet()
Returns an unmodifiable Set view of the property entries contained in thisProvider
.Security.getAlgorithms
(String serviceName) Returns a Set ofString
objects containing the names of all available algorithms or types for the specified Java cryptographic service (e.g.,Signature
,MessageDigest
,Cipher
,Mac
,KeyStore
).default Set
<KeyStore.Entry.Attribute> KeyStore.Entry.getAttributes()
Retrieves the attributes associated with an entry.final Set
<KeyStore.Entry.Attribute> KeyStore.getAttributes
(String alias) Retrieves the attributes associated with the given alias.KeyStore.PrivateKeyEntry.getAttributes()
Retrieves the attributes associated with an entry.KeyStore.SecretKeyEntry.getAttributes()
Retrieves the attributes associated with an entry.KeyStore.TrustedCertificateEntry.getAttributes()
Retrieves the attributes associated with an entry.Provider.getServices()
Get an unmodifiable Set of all services supported by thisProvider
.Provider.keySet()
Returns an unmodifiable Set view of the property keys contained in thisProvider
.Modifier and TypeMethodDescriptionboolean
AlgorithmConstraints.permits
(Set<CryptoPrimitive> primitives, String algorithm, AlgorithmParameters parameters) Determines whether an algorithm is granted permission for the specified cryptographic primitives.boolean
AlgorithmConstraints.permits
(Set<CryptoPrimitive> primitives, String algorithm, Key key, AlgorithmParameters parameters) Determines whether an algorithm and the corresponding key are granted permission for the specified cryptographic primitives.boolean
AlgorithmConstraints.permits
(Set<CryptoPrimitive> primitives, Key key) Determines whether a key is granted permission for the specified cryptographic primitives.ModifierConstructorDescriptionPrivateKeyEntry
(PrivateKey privateKey, Certificate[] chain, Set<KeyStore.Entry.Attribute> attributes) Constructs aPrivateKeyEntry
with aPrivateKey
and corresponding certificate chain and associated entry attributes.SecretKeyEntry
(SecretKey secretKey, Set<KeyStore.Entry.Attribute> attributes) Constructs aSecretKeyEntry
with aSecretKey
and associated entry attributes.TrustedCertificateEntry
(Certificate trustedCert, Set<KeyStore.Entry.Attribute> attributes) Constructs aTrustedCertificateEntry
with a trustedCertificate
and associated entry attributes. -
Uses of Set in java.security.cert
Modifier and TypeMethodDescriptionX509Extension.getCriticalExtensionOIDs()
Gets a Set of the OID strings for the extension(s) marked CRITICAL in the certificate/CRL managed by the object implementing this interface.PolicyNode.getExpectedPolicies()
Returns the set of expected policies that would satisfy this node's valid policy in the next certificate to be processed.X509CertSelector.getExtendedKeyUsage()
Returns the extendedKeyUsage criterion.PKIXParameters.getInitialPolicies()
Returns an immutableSet
of initial policy identifiers (OID strings), indicating that any one of these policies would be acceptable to the certificate user for the purposes of certification path processing.X509Extension.getNonCriticalExtensionOIDs()
Gets a Set of the OID strings for the extension(s) marked NON-CRITICAL in the certificate/CRL managed by the object implementing this interface.PKIXRevocationChecker.getOptions()
Gets the revocation options.X509CertSelector.getPolicy()
Returns the policy criterion.Set
<? extends PolicyQualifierInfo> PolicyNode.getPolicyQualifiers()
Returns the set of policy qualifiers associated with the valid policy represented by this node.abstract Set
<? extends X509CRLEntry> X509CRL.getRevokedCertificates()
Gets all the entries from this CRL.PKIXCertPathChecker.getSupportedExtensions()
Returns an immutableSet
of X.509 certificate extensions that thisPKIXCertPathChecker
supports (i.e. recognizes, is able to process), ornull
if no extensions are supported.PKIXParameters.getTrustAnchors()
Returns an immutableSet
of the most-trusted CAs.Modifier and TypeMethodDescriptionvoid
X509CertSelector.setExtendedKeyUsage
(Set<String> keyPurposeSet) Sets the extendedKeyUsage criterion.void
PKIXParameters.setInitialPolicies
(Set<String> initialPolicies) Sets theSet
of initial policy identifiers (OID strings), indicating that any one of these policies would be acceptable to the certificate user for the purposes of certification path processing.void
PKIXRevocationChecker.setOptions
(Set<PKIXRevocationChecker.Option> options) Sets the revocation options.void
Sets the policy constraint.void
PKIXParameters.setTrustAnchors
(Set<TrustAnchor> trustAnchors) Sets theSet
of most-trusted CAs.ModifierConstructorDescriptionPKIXBuilderParameters
(Set<TrustAnchor> trustAnchors, CertSelector targetConstraints) Creates an instance ofPKIXBuilderParameters
with the specifiedSet
of most-trusted CAs.PKIXParameters
(Set<TrustAnchor> trustAnchors) Creates an instance ofPKIXParameters
with the specifiedSet
of most-trusted CAs. -
Uses of Set in java.text
Modifier and TypeMethodDescriptionAttributedCharacterIterator.getAllAttributeKeys()
Returns the keys of all attributes defined on the iterator's text range.Modifier and TypeMethodDescriptionint
AttributedCharacterIterator.getRunLimit
(Set<? extends AttributedCharacterIterator.Attribute> attributes) Returns the index of the first character following the run with respect to the givenattributes
containing the current character.int
AttributedCharacterIterator.getRunStart
(Set<? extends AttributedCharacterIterator.Attribute> attributes) Returns the index of the first character of the run with respect to the givenattributes
containing the current character. -
Uses of Set in java.time
Modifier and TypeMethodDescriptionZoneId.getAvailableZoneIds()
Gets the set of available zone IDs. -
Uses of Set in java.time.chrono
Modifier and TypeMethodDescriptionstatic Set
<Chronology> Chronology.getAvailableChronologies()
Returns the available chronologies. -
Uses of Set in java.time.format
Modifier and TypeMethodDescriptionDecimalStyle.getAvailableLocales()
Lists all the locales that are supported.DateTimeFormatter.getResolverFields()
Gets the resolver fields to use during parsing.Modifier and TypeMethodDescriptionDateTimeFormatterBuilder.appendGenericZoneText
(TextStyle textStyle, Set<ZoneId> preferredZones) Appends the generic time-zone name, such as 'Pacific Time', to the formatter.DateTimeFormatterBuilder.appendZoneText
(TextStyle textStyle, Set<ZoneId> preferredZones) Appends the time-zone name, such as 'British Summer Time', to the formatter.DateTimeFormatter.withResolverFields
(Set<TemporalField> resolverFields) Returns a copy of this formatter with a new set of resolver fields. -
Uses of Set in java.time.zone
Modifier and TypeMethodDescriptionZoneRulesProvider.getAvailableZoneIds()
Gets the set of available zone IDs.ZoneRulesProvider.provideZoneIds()
SPI method to get the available zone IDs. -
Uses of Set in java.util
Modifier and TypeInterfaceDescriptioninterface
NavigableSet<E>
ASortedSet
extended with navigation methods reporting closest matches for given search targets.interface
SequencedSet<E>
A collection that is both aSequencedCollection
and aSet
.interface
SortedSet<E>
ASet
that further provides a total ordering on its elements.Modifier and TypeClassDescriptionclass
AbstractSet<E>
This class provides a skeletal implementation of theSet
interface to minimize the effort required to implement this 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
TreeSet<E>
ANavigableSet
implementation based on aTreeMap
.Modifier and TypeFieldDescriptionstatic final Set
Collections.EMPTY_SET
The empty set (immutable).Modifier and TypeMethodDescriptionstatic <E> Set
<E> Collections.checkedSet
(Set<E> s, Class<E> type) Returns a dynamically typesafe view of the specified set.static <E> Set
<E> Set.copyOf
(Collection<? extends E> coll) Returns an unmodifiable Set containing the elements of the given Collection.static final <T> Set
<T> Collections.emptySet()
Returns an empty set (immutable).EnumMap.entrySet()
Returns aSet
view of the mappings contained in this map.HashMap.entrySet()
Returns aSet
view of the mappings contained in this map.Hashtable.entrySet()
Returns aSet
view of the mappings contained in this map.IdentityHashMap.entrySet()
Returns aSet
view of the mappings contained in this map.LinkedHashMap.entrySet()
Returns aSet
view of the mappings contained in this map.Map.entrySet()
Returns aSet
view of the mappings contained in this map.SortedMap.entrySet()
Returns aSet
view of the mappings contained in this map.TreeMap.entrySet()
Returns aSet
view of the mappings contained in this map.WeakHashMap.entrySet()
Returns aSet
view of the mappings contained in this map.Calendar.getAvailableCalendarTypes()
Returns an unmodifiableSet
containing all calendar types supported byCalendar
in the runtime environment.Currency.getAvailableCurrencies()
Gets the set of available currencies.Locale.getExtensionKeys()
Returns the set of extension keys associated with this locale, or the empty set if it has no extensions.Locale.getISOCountries
(Locale.IsoCountryCode type) Returns aSet
of ISO3166 country codes for the specified type.Locale.getUnicodeLocaleAttributes()
Returns the set of unicode locale attributes associated with this locale, or the empty set if it has no attributes.Locale.getUnicodeLocaleKeys()
Returns the set of Unicode locale keys defined by this locale, or the empty set if this locale has none.ListResourceBundle.handleKeySet()
Returns aSet
of the keys contained only in thisResourceBundle
.PropertyResourceBundle.handleKeySet()
Returns aSet
of the keys contained only in thisResourceBundle
.ResourceBundle.handleKeySet()
Returns aSet
of the keys contained only in thisResourceBundle
.AbstractMap.keySet()
Returns aSet
view of the keys contained in this map.EnumMap.keySet()
Returns aSet
view of the keys contained in this map.HashMap.keySet()
Returns aSet
view of the keys contained in this map.Hashtable.keySet()
Returns aSet
view of the keys contained in this map.IdentityHashMap.keySet()
Returns an identity-based set view of the keys contained in this map.LinkedHashMap.keySet()
Returns aSet
view of the keys contained in this map.Map.keySet()
Returns aSet
view of the keys contained in this map.ResourceBundle.keySet()
Returns aSet
of all keys contained in thisResourceBundle
and its parent bundles.SortedMap.keySet()
Returns aSet
view of the keys contained in this map.TreeMap.keySet()
Returns aSet
view of the keys contained in this map.WeakHashMap.keySet()
Returns aSet
view of the keys contained in this map.static <E> Set
<E> Collections.newSetFromMap
(Map<E, Boolean> map) Returns a set backed by the specified map.static <E> Set
<E> Set.of()
Returns an unmodifiable set containing zero elements.static <E> Set
<E> Set.of
(E e1) Returns an unmodifiable set containing one element.static <E> Set
<E> Set.of
(E... elements) Returns an unmodifiable set containing an arbitrary number of elements.static <E> Set
<E> Set.of
(E e1, E e2) Returns an unmodifiable set containing two elements.static <E> Set
<E> Set.of
(E e1, E e2, E e3) Returns an unmodifiable set containing three elements.static <E> Set
<E> Set.of
(E e1, E e2, E e3, E e4) Returns an unmodifiable set containing four elements.static <E> Set
<E> Set.of
(E e1, E e2, E e3, E e4, E e5) Returns an unmodifiable set containing five elements.static <E> Set
<E> Set.of
(E e1, E e2, E e3, E e4, E e5, E e6) Returns an unmodifiable set containing six elements.static <E> Set
<E> Set.of
(E e1, E e2, E e3, E e4, E e5, E e6, E e7) Returns an unmodifiable set containing seven elements.static <E> Set
<E> Set.of
(E e1, E e2, E e3, E e4, E e5, E e6, E e7, E e8) Returns an unmodifiable set containing eight elements.static <E> Set
<E> Set.of
(E e1, E e2, E e3, E e4, E e5, E e6, E e7, E e8, E e9) Returns an unmodifiable set containing nine elements.static <E> Set
<E> Set.of
(E e1, E e2, E e3, E e4, E e5, E e6, E e7, E e8, E e9, E e10) Returns an unmodifiable set containing ten elements.static <T> Set
<T> Collections.singleton
(T o) Returns an immutable set containing only the specified object.Properties.stringPropertyNames()
Returns an unmodifiable set of keys from this property list where the key and its corresponding value are strings, including distinct keys in the default property list if a key of the same name has not already been found from the main properties list.static <T> Set
<T> Collections.synchronizedSet
(Set<T> s) Returns a synchronized (thread-safe) set backed by the specified set.static <T> Set
<T> Collections.unmodifiableSet
(Set<? extends T> s) Returns an unmodifiable view of the specified set.Modifier and TypeMethodDescriptionstatic <E> Set
<E> Collections.checkedSet
(Set<E> s, Class<E> type) Returns a dynamically typesafe view of the specified set.static <T> Set
<T> Collections.synchronizedSet
(Set<T> s) Returns a synchronized (thread-safe) set backed by the specified set.static <T> Set
<T> Collections.unmodifiableSet
(Set<? extends T> s) Returns an unmodifiable view of the specified set. -
Uses of Set in java.util.concurrent
Modifier and TypeClassDescriptionstatic 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
A scalable concurrentNavigableSet
implementation based on aConcurrentSkipListMap
.class
ASet
that uses an internalCopyOnWriteArrayList
for all of its operations. -
Uses of Set in java.util.jar
-
Uses of Set in java.util.stream
Modifier and TypeMethodDescriptionCollector.characteristics()
Returns aSet
ofCollector.Characteristics
indicating the characteristics of this Collector.Modifier and TypeMethodDescriptionCollectors.toSet()
Returns aCollector
that accumulates the input elements into a newSet
.Collectors.toUnmodifiableSet()
Returns aCollector
that accumulates the input elements into an unmodifiable Set. -
Uses of Set in javax.annotation.processing
Modifier and TypeMethodDescriptionRoundEnvironment.getElementsAnnotatedWith
(Class<? extends Annotation> a) Returns the elements annotated with the given annotation interface.RoundEnvironment.getElementsAnnotatedWith
(TypeElement a) Returns the elements annotated with the given annotation interface.RoundEnvironment.getElementsAnnotatedWithAny
(Set<Class<? extends Annotation>> annotations) Returns the elements annotated with one or more of the given annotation interfaces.RoundEnvironment.getElementsAnnotatedWithAny
(TypeElement... annotations) Returns the elements annotated with one or more of the given annotation interfaces.RoundEnvironment.getRootElements()
Returns the root elements for annotation processing generated by the prior round.AbstractProcessor.getSupportedAnnotationTypes()
Returns the names of the annotation interfaces supported by this processor.Processor.getSupportedAnnotationTypes()
Returns the names of the annotation interfaces supported by this processor.AbstractProcessor.getSupportedOptions()
Returns the options recognized by this processor.Processor.getSupportedOptions()
Returns the options recognized by this processor.Modifier and TypeMethodDescriptionRoundEnvironment.getElementsAnnotatedWithAny
(Set<Class<? extends Annotation>> annotations) Returns the elements annotated with one or more of the given annotation interfaces.abstract boolean
AbstractProcessor.process
(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) Processes a set of annotation interfaces on root elements originating from the prior round and returns whether or not these annotation interfaces are claimed by this processor.boolean
Processor.process
(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) Processes a set of annotation interfaces on root elements originating from the prior round and returns whether or not these annotation interfaces are claimed by this processor. -
Uses of Set in javax.imageio
Modifier and TypeMethodDescriptionImageReader.getImageMetadata
(int imageIndex, String formatName, Set<String> nodeNames) Returns anIIOMetadata
object representing the metadata associated with the given image, ornull
if the reader does not support reading metadata or none is available.ImageReader.getStreamMetadata
(String formatName, Set<String> nodeNames) Returns anIIOMetadata
object representing the metadata associated with the input source as a whole (i.e., not associated with any particular image). -
Uses of Set in javax.lang.model.element
Modifier and TypeMethodDescriptionElement.getModifiers()
Returns the modifiers of this element, excluding annotations. -
Uses of Set in javax.lang.model.util
Modifier and TypeMethodDescriptionstatic Set
<ExecutableElement> ElementFilter.constructorsIn
(Set<? extends Element> elements) Returns a set of constructors inelements
.static Set
<VariableElement> Returns a set of fields inelements
.default Set
<? extends ModuleElement> Elements.getAllModuleElements()
Returns all module elements in the current environment.default Set
<? extends PackageElement> Elements.getAllPackageElements
(CharSequence name) Returns all package elements with the given canonical name.default Set
<? extends TypeElement> Elements.getAllTypeElements
(CharSequence name) Returns all type elements with the given canonical name.static Set
<ExecutableElement> Returns a set of methods inelements
.static Set
<ModuleElement> Returns a set of modules inelements
.static Set
<PackageElement> ElementFilter.packagesIn
(Set<? extends Element> elements) Returns a set of packages inelements
.static Set
<RecordComponentElement> ElementFilter.recordComponentsIn
(Set<? extends Element> elements) Returns a set of record components inelements
.static Set
<TypeElement> Returns a set of types inelements
.Modifier and TypeMethodDescriptionstatic Set
<ExecutableElement> ElementFilter.constructorsIn
(Set<? extends Element> elements) Returns a set of constructors inelements
.static Set
<VariableElement> Returns a set of fields inelements
.static Set
<ExecutableElement> Returns a set of methods inelements
.static Set
<ModuleElement> Returns a set of modules inelements
.static Set
<PackageElement> ElementFilter.packagesIn
(Set<? extends Element> elements) Returns a set of packages inelements
.static Set
<RecordComponentElement> ElementFilter.recordComponentsIn
(Set<? extends Element> elements) Returns a set of record components inelements
.static Set
<TypeElement> Returns a set of types inelements
. -
Uses of Set in javax.management
Modifier and TypeMethodDescriptionMBeanServer.queryMBeans
(ObjectName name, QueryExp query) Gets MBeans controlled by the MBean server.MBeanServerConnection.queryMBeans
(ObjectName name, QueryExp query) Gets MBeans controlled by the MBean server.MBeanServer.queryNames
(ObjectName name, QueryExp query) Gets the names of MBeans controlled by the MBean server.MBeanServerConnection.queryNames
(ObjectName name, QueryExp query) Gets the names of MBeans controlled by the MBean server. -
Uses of Set in javax.management.loading
Modifier and TypeMethodDescriptionMLet.getMBeansFromURL
(String url) Deprecated, for removal: This API element is subject to removal in a future version.Loads a text file containing MLET tags that define the MBeans to be added to the MBean server.MLet.getMBeansFromURL
(URL url) Deprecated, for removal: This API element is subject to removal in a future version.Loads a text file containing MLET tags that define the MBeans to be added to the MBean server.MLetMBean.getMBeansFromURL
(String url) Deprecated, for removal: This API element is subject to removal in a future version.Loads a text file containing MLET tags that define the MBeans to be added to the MBean server.MLetMBean.getMBeansFromURL
(URL url) Deprecated, for removal: This API element is subject to removal in a future version.Loads a text file containing MLET tags that define the MBeans to be added to the MBean server. -
Uses of Set in javax.management.openmbean
Modifier and TypeMethodDescriptionTabularDataSupport.entrySet()
Returns a collection view of the index to row mappings contained in thisTabularDataSupport
instance.Set
<?> OpenMBeanAttributeInfoSupport.getLegalValues()
Returns an unmodifiable Set of legal values for the attribute described by thisOpenMBeanAttributeInfoSupport
instance, if specified, ornull
otherwise.Set
<?> OpenMBeanParameterInfo.getLegalValues()
Returns the set of legal values for this parameter, if it has one, ornull
otherwise.Set
<?> OpenMBeanParameterInfoSupport.getLegalValues()
Returns an unmodifiable Set of legal values for the parameter described by thisOpenMBeanParameterInfoSupport
instance, if specified, ornull
otherwise.CompositeType.keySet()
Returns an unmodifiable Set view of all the item names defined by thisCompositeType
instance.Set
<?> TabularData.keySet()
Returns a set view of the keys (ie the index values) of theCompositeData
values (ie the rows) contained in thisTabularData
instance.TabularDataSupport.keySet()
Returns a set view of the keys contained in the underlying map of thisTabularDataSupport
instance used to index the rows. -
Uses of Set in javax.management.remote.rmi
Modifier and TypeMethodDescriptionRMIConnection.queryMBeans
(ObjectName name, MarshalledObject query, Subject delegationSubject) Handles the methodMBeanServerConnection.queryMBeans(ObjectName, QueryExp)
.RMIConnectionImpl_Stub.queryMBeans
(ObjectName $param_ObjectName_1, MarshalledObject $param_MarshalledObject_2, Subject $param_Subject_3) RMIConnectionImpl.queryMBeans
(ObjectName name, MarshalledObject query, Subject delegationSubject) RMIConnection.queryNames
(ObjectName name, MarshalledObject query, Subject delegationSubject) Handles the methodMBeanServerConnection.queryNames(ObjectName, QueryExp)
.RMIConnectionImpl_Stub.queryNames
(ObjectName $param_ObjectName_1, MarshalledObject $param_MarshalledObject_2, Subject $param_Subject_3) RMIConnectionImpl.queryNames
(ObjectName name, MarshalledObject query, Subject delegationSubject) -
Uses of Set in javax.print.attribute.standard
Modifier 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.Modifier and TypeMethodDescriptionPrinterStateReasons.printerStateReasonSet
(Severity severity) Obtain an unmodifiable set view of the individual printer state reason attributes at the given severity level in thisPrinterStateReasons
attribute. -
Uses of Set in javax.script
-
Uses of Set in javax.security.auth
Modifier and TypeMethodDescriptionSubject.getPrincipals()
Return theSet
of Principals associated with thisSubject
.Subject.getPrincipals
(Class<T> c) Return aSet
of Principals associated with thisSubject
that are instances or subclasses of the specifiedClass
.Subject.getPrivateCredentials()
Return theSet
of private credentials held by thisSubject
.<T> Set
<T> Subject.getPrivateCredentials
(Class<T> c) Return aSet
of private credentials associated with thisSubject
that are instances or subclasses of the specifiedClass
.Subject.getPublicCredentials()
Return theSet
of public credentials held by thisSubject
.<T> Set
<T> Subject.getPublicCredentials
(Class<T> c) Return aSet
of public credentials associated with thisSubject
that are instances or subclasses of the specifiedClass
. -
Uses of Set in javax.swing
Modifier and TypeMethodDescriptionvoid
JComponent.setFocusTraversalKeys
(int id, Set<? extends AWTKeyStroke> keystrokes) Sets the focus traversal keys for a given traversal operation for this Component. -
Uses of Set in javax.tools
Modifier and TypeMethodDescriptionTool.getSourceVersions()
Returns the source versions of the Java programming language supported by this tool.Modifier and TypeMethodDescriptionForwardingJavaFileManager.listLocationsForModules
(JavaFileManager.Location location) default Iterable
<Set<JavaFileManager.Location>> JavaFileManager.listLocationsForModules
(JavaFileManager.Location location) Lists the locations for all the modules in a module-oriented location or an output location.Modifier and TypeMethodDescriptionForwardingJavaFileManager.list
(JavaFileManager.Location location, String packageName, Set<JavaFileObject.Kind> kinds, boolean recurse) JavaFileManager.list
(JavaFileManager.Location location, String packageName, Set<JavaFileObject.Kind> kinds, boolean recurse) Lists all file objects matching the given criteria in the given package-oriented location.