Package Summary Overview Summary

### class:Thread.Builder.OfPlatform [CHANGED]
All Superinterfaces: `Thread.BuilderPREVIEW` Enclosing interface: `Thread.BuilderPREVIEW` public static sealed interface Thread.Builder.OfPlatform extends Thread.BuilderPREVIEW `OfPlatform` is a preview API of the Java platform. Programs can only use `OfPlatform` when preview features are enabled. Preview features may be removed in a future release, or upgraded to permanent features of the Java platform. A builder for creating a platform `Thread` or `ThreadFactory` that creates platform threads. Unless otherwise specified, passing a null argument to a method in this interface causes a `NullPointerException` to be thrown. Since: 19 21 See Also: `Thread.ofPlatform()`PREVIEW
All Superinterfaces: `Thread.BuilderPREVIEW` Enclosing interface: `Thread.BuilderPREVIEW` public static sealed interface Thread.Builder.OfPlatform extends Thread.BuilderPREVIEW `OfPlatform` is a preview API of the Java platform. Programs can only use `OfPlatform` when preview features are enabled. Preview features may be removed in a future release, or upgraded to permanent features of the Java platform. A builder for creating a platform `Thread` or `ThreadFactory` that creates platform threads. Unless otherwise specified, passing a null argument to a method in this interface causes a `NullPointerException` to be thrown. Since: 19 See Also: `Thread.ofPlatform()`PREVIEW | All Superinterfaces: `Thread.Builder` Enclosing interface: `Thread.Builder` public static sealed interface Thread.Builder.OfPlatform extends Thread.Builder A builder for creating a platform `Thread` or `ThreadFactory` that creates platform threads. Unless otherwise specified, passing a null argument to a method in this interface causes a `NullPointerException` to be thrown. Since: 21 See Also: `Thread.ofPlatform()`

### method:name(java.lang.String) [CHANGED]
### name Thread.Builder.OfPlatformPREVIEW name (String name) Description copied from interface: `Thread.Builder` Sets the thread name. Specified by: `name` in interface `Thread.BuilderPREVIEW` Parameters: `name` - thread name Returns: this builder
### name Thread.Builder.OfPlatformPREVIEW name (String name) Description copied from interface: `Thread.Builder` Sets the thread name. Specified by: `name` in interface `Thread.BuilderPREVIEW` Parameters: `name` - thread name Returns: this builder | ### name Thread.Builder.OfPlatform name (String name) Description copied from interface: `Thread.Builder` Sets the thread name. Specified by: `name` in interface `Thread.Builder` Parameters: `name` - thread name Returns: this builder

### method:name(java.lang.String,long) [CHANGED]
### name Thread.Builder.OfPlatformPREVIEW name (String prefix, long start) Description copied from interface: `Thread.Builder` Sets the thread name to be the concatenation of a string prefix and the string representation of a counter value. The counter's initial value is `start`. It is incremented after a `Thread` is created with this builder so that the next thread is named with the new counter value. A `ThreadFactory` created with this builder is seeded with the current value of the counter. The `ThreadFactory` increments its copy of the counter after `newThread` is used to create a `Thread`. Specified by: `name` in interface `Thread.BuilderPREVIEW` Parameters: `prefix` - thread name prefix `start` - the starting value of the counter Returns: this builder Throws: `IllegalArgumentException` - if start is negative
### name Thread.Builder.OfPlatformPREVIEW name (String prefix, long start) Description copied from interface: `Thread.Builder` Sets the thread name to be the concatenation of a string prefix and the string representation of a counter value. The counter's initial value is `start`. It is incremented after a `Thread` is created with this builder so that the next thread is named with the new counter value. A `ThreadFactory` created with this builder is seeded with the current value of the counter. The `ThreadFactory` increments its copy of the counter after `newThread` is used to create a `Thread`. Specified by: `name` in interface `Thread.BuilderPREVIEW` Parameters: `prefix` - thread name prefix `start` - the starting value of the counter Returns: this builder Throws: `IllegalArgumentException` - if start is negative | ### name Thread.Builder.OfPlatform name (String prefix, long start) Description copied from interface: `Thread.Builder` Sets the thread name to be the concatenation of a string prefix and the string representation of a counter value. The counter's initial value is `start`. It is incremented after a `Thread` is created with this builder so that the next thread is named with the new counter value. A `ThreadFactory` created with this builder is seeded with the current value of the counter. The `ThreadFactory` increments its copy of the counter after `newThread` is used to create a `Thread`. Specified by: `name` in interface `Thread.Builder` Parameters: `prefix` - thread name prefix `start` - the starting value of the counter Returns: this builder Throws: `IllegalArgumentException` - if start is negative

### method:allowSetThreadLocals(boolean) [REMOVED]
### allowSetThreadLocals Thread.Builder.OfPlatformPREVIEW allowSetThreadLocals (boolean allow) Description copied from interface: `Thread.Builder` Sets whether the thread is allowed to set values for its copy of thread-local variables. The default is to allow. If not allowed, then any attempt by the thread to set a value for a thread-local with the `ThreadLocal.set(Object)` method throws `UnsupportedOperationException` . Any attempt to set the thread's context class loader with `setContextClassLoader` also throws. The `ThreadLocal.get()` method always returns the initial-value when thread locals are not allowed. Specified by: `allowSetThreadLocals` in interface `Thread.BuilderPREVIEW` Parameters: `allow` - `true` to allow, `false` to disallow Returns: this builder

### method:inheritInheritableThreadLocals(boolean) [CHANGED]
### inheritInheritableThreadLocals Thread.Builder.OfPlatform PREVIEW inheritInheritableThreadLocals (boolean inherit) Description copied from interface: `Thread.Builder` Sets whether the thread inherits the initial values of inheritable-thread-local variables from the constructing thread. The default is to inherit. The initial values of `InheritableThreadLocal` s are never inherited when `Thread.Builder.allowSetThreadLocals(boolean)`PREVIEW is used to disallow the thread to have its own copy of thread-local variables. Specified by: `inheritInheritableThreadLocals` in interface `Thread.BuilderPREVIEW` Parameters: `inherit` - `true` to inherit, `false` to not inherit Returns: this builder
### inheritInheritableThreadLocals Thread.Builder.OfPlatformPREVIEW inheritInheritableThreadLocals (boolean inherit) Description copied from interface: `Thread.Builder` Sets whether the thread inherits the initial values of inheritable-thread-local variables from the constructing thread. The default is to inherit. The initial values of `InheritableThreadLocal`s are never inherited when `Thread.Builder.allowSetThreadLocals(boolean)`PREVIEW is used to disallow the thread to have its own copy of thread-local variables. Specified by: `inheritInheritableThreadLocals` in interface `Thread.BuilderPREVIEW` Parameters: `inherit` - `true` to inherit, `false` to not inherit Returns: this builder | ### inheritInheritableThreadLocals Thread.Builder.OfPlatform inheritInheritableThreadLocals (boolean inherit) Description copied from interface: `Thread.Builder` Sets whether the thread inherits the initial values of inheritable-thread-local variables from the constructing thread. The default is to inherit. Specified by: `inheritInheritableThreadLocals` in interface `Thread.Builder` Parameters: `inherit` - `true` to inherit, `false` to not inherit Returns: this builder

### method:uncaughtExceptionHandler(java.lang.Thread.UncaughtExceptionHandler) [CHANGED]
### uncaughtExceptionHandler Thread.Builder.OfPlatformPREVIEW uncaughtExceptionHandler (Thread.UncaughtExceptionHandler ueh) Description copied from interface: `Thread.Builder` Sets the uncaught exception handler. Specified by: `uncaughtExceptionHandler` in interface `Thread.BuilderPREVIEW` Parameters: `ueh` - uncaught exception handler Returns: this builder
### uncaughtExceptionHandler Thread.Builder.OfPlatformPREVIEW uncaughtExceptionHandler (Thread.UncaughtExceptionHandler ueh) Description copied from interface: `Thread.Builder` Sets the uncaught exception handler. Specified by: `uncaughtExceptionHandler` in interface `Thread.BuilderPREVIEW` Parameters: `ueh` - uncaught exception handler Returns: this builder | ### uncaughtExceptionHandler Thread.Builder.OfPlatform uncaughtExceptionHandler (Thread.UncaughtExceptionHandler ueh) Description copied from interface: `Thread.Builder` Sets the uncaught exception handler. Specified by: `uncaughtExceptionHandler` in interface `Thread.Builder` Parameters: `ueh` - uncaught exception handler Returns: this builder

### method:group(java.lang.ThreadGroup) [CHANGED]
### group Thread.Builder.OfPlatformPREVIEW group (ThreadGroup group) Sets the thread group. Parameters: `group` - the thread group Returns: this builder
### group Thread.Builder.OfPlatformPREVIEW group (ThreadGroup group) Sets the thread group. Parameters: `group` - the thread group Returns: this builder | ### group Thread.Builder.OfPlatform group (ThreadGroup group) Sets the thread group. Parameters: `group` - the thread group Returns: this builder

### method:daemon(boolean) [CHANGED]
### daemon Thread.Builder.OfPlatformPREVIEW daemon (boolean on) Sets the daemon status. Parameters: `on` - `true` to create daemon threads Returns: this builder
### daemon Thread.Builder.OfPlatformPREVIEW daemon (boolean on) Sets the daemon status. Parameters: `on` - `true` to create daemon threads Returns: this builder | ### daemon Thread.Builder.OfPlatform daemon (boolean on) Sets the daemon status. Parameters: `on` - `true` to create daemon threads Returns: this builder

### method:daemon() [CHANGED]
### daemon default Thread.Builder.OfPlatformPREVIEW daemon() Sets the daemon status to `true`. Implementation Requirements: The default implementation invokes daemon(boolean) with a value of `true`. Returns: this builder
### daemon default Thread.Builder.OfPlatformPREVIEW daemon() Sets the daemon status to `true`. Implementation Requirements: The default implementation invokes daemon(boolean) with a value of `true`. Returns: this builder | ### daemon default Thread.Builder.OfPlatform daemon() Sets the daemon status to `true`. Implementation Requirements: The default implementation invokes daemon(boolean) with a value of `true`. Returns: this builder

### method:priority(int) [CHANGED]
### priority Thread.Builder.OfPlatformPREVIEW priority (int priority) Sets the thread priority. Parameters: `priority` - priority Returns: this builder Throws: `IllegalArgumentException` - if the priority is less than `Thread.MIN_PRIORITY` or greater than `Thread.MAX_PRIORITY`
### priority Thread.Builder.OfPlatformPREVIEW priority (int priority) Sets the thread priority. Parameters: `priority` - priority Returns: this builder Throws: `IllegalArgumentException` - if the priority is less than `Thread.MIN_PRIORITY` or greater than `Thread.MAX_PRIORITY` | ### priority Thread.Builder.OfPlatform priority (int priority) Sets the thread priority. Parameters: `priority` - priority Returns: this builder Throws: `IllegalArgumentException` - if the priority is less than `Thread.MIN_PRIORITY` or greater than `Thread.MAX_PRIORITY`

### method:stackSize(long) [CHANGED]
### stackSize Thread.Builder.OfPlatformPREVIEW stackSize (long stackSize) Sets the desired stack size. The stack size is the approximate number of bytes of address space that the Java virtual machine is to allocate for the thread's stack. The effect is highly platform dependent and the Java virtual machine is free to treat the `stackSize` parameter as a "suggestion". If the value is unreasonably low for the platform then a platform specific minimum may be used. If the value is unreasonably high then a platform specific maximum may be used. A value of zero is always ignored. Parameters: `stackSize` - the desired stack size Returns: this builder Throws: `IllegalArgumentException` - if the stack size is negative
### stackSize Thread.Builder.OfPlatformPREVIEW stackSize (long stackSize) Sets the desired stack size. The stack size is the approximate number of bytes of address space that the Java virtual machine is to allocate for the thread's stack. The effect is highly platform dependent and the Java virtual machine is free to treat the `stackSize` parameter as a "suggestion". If the value is unreasonably low for the platform then a platform specific minimum may be used. If the value is unreasonably high then a platform specific maximum may be used. A value of zero is always ignored. Parameters: `stackSize` - the desired stack size Returns: this builder Throws: `IllegalArgumentException` - if the stack size is negative | ### stackSize Thread.Builder.OfPlatform stackSize (long stackSize) Sets the desired stack size. The stack size is the approximate number of bytes of address space that the Java virtual machine is to allocate for the thread's stack. The effect is highly platform dependent and the Java virtual machine is free to treat the `stackSize` parameter as a "suggestion". If the value is unreasonably low for the platform then a platform specific minimum may be used. If the value is unreasonably high then a platform specific maximum may be used. A value of zero is always ignored. Parameters: `stackSize` - the desired stack size Returns: this builder Throws: `IllegalArgumentException` - if the stack size is negative