/** * Initializes the value for the {@link ThreadFactoryProvider#logger() logger} attribute. * @param logger The value for logger * @return {@code this} builder for use in a chained invocation */ @CanIgnoreReturnValue public final Builder logger(Logger logger) { checkNotIsSet(loggerIsSet(), "logger"); this.logger = Objects.requireNonNull(logger, "logger"); initBits &= ~INIT_BIT_LOGGER; return this; }
/** * Initializes the optional value {@link ThreadFactoryProvider#priority() priority} to priority. * @param priority The value for priority * @return {@code this} builder for use in a chained invocation */ @CanIgnoreReturnValue public final Builder priority(Optional<Integer> priority) { checkNotIsSet(priorityIsSet(), "priority"); this.priority = priority.orElse(null); optBits |= OPT_BIT_PRIORITY; return this; }
/** * Initializes the value for the {@link ThreadFactoryProvider#namePrefix() namePrefix} attribute. * @param namePrefix The value for namePrefix * @return {@code this} builder for use in a chained invocation */ @CanIgnoreReturnValue public final Builder namePrefix(String namePrefix) { checkNotIsSet(namePrefixIsSet(), "namePrefix"); this.namePrefix = Objects.requireNonNull(namePrefix, "namePrefix"); initBits &= ~INIT_BIT_NAME_PREFIX; return this; }
/** * Initializes the value for the {@link ThreadFactoryProvider#daemon() daemon} attribute. * <p><em>If not set, this attribute will have a default value as returned by the initializer of {@link ThreadFactoryProvider#daemon() daemon}.</em> * @param daemon The value for daemon * @return {@code this} builder for use in a chained invocation */ @CanIgnoreReturnValue public final Builder daemon(boolean daemon) { checkNotIsSet(daemonIsSet(), "daemon"); this.daemon = daemon; optBits |= OPT_BIT_DAEMON; return this; }
/** * Initializes the optional value {@link ThreadFactoryProvider#priority() priority} to priority. * @param priority The value for priority * @return {@code this} builder for chained invocation */ @CanIgnoreReturnValue public final Builder priority(int priority) { checkNotIsSet(priorityIsSet(), "priority"); this.priority = priority; optBits |= OPT_BIT_PRIORITY; return this; }