Code example for ThreadFactoryBuilder

0
   * @param nameFormat Name format for the thread names 
   * @return A {@link ThreadFactory}. 
   * @see ThreadFactoryBuilder 
   */ 
  public static ThreadFactory createDaemonThreadFactory(String nameFormat) {
    return new ThreadFactoryBuilder()
      .setDaemon(true)
      .setNameFormat(nameFormat)
      .build();
  } 
 
  private Threads() { 
  } 
}