guava/src/com/google/common/util/concurrent/ThreadFactoryBuilder.java
public ThreadFactoryBuilder setNameFormat(String nameFormat) {
    String unused = format(nameFormat, 0); // fail fast if the format is bad or null
    this.nameFormat = nameFormat;
    return this;
  }
public ThreadFactoryBuilder setNameFormat(String nameFormat) {
    String unused = format(nameFormat, 0); // fail fast if the format is bad or null
    this.nameFormat = nameFormat;
    return this;
  }
Sets the naming format to use when naming threads ({@link Thread#setName}) which are created
with this ThreadFactory.

@param nameFormat a {@link String#format(String, Object...)}-compatible format String, to which
a unique integer (0, 1, etc.) will be supplied as the single parameter. This integer will
be unique to the built instance of the ThreadFactory and will be assigned sequentially. For
example, {@code "rpc-pool-%d"} will generate thread names like {@code "rpc-pool-0"}, {@code
"rpc-pool-1"}, {@code "rpc-pool-2"}, etc.
@return this for the builder pattern