class DefaultThreadFactory implements ThreadFactory {

    @Override
    public Thread newThread(Runnable r) {
        Thread t = newThread(new DefaultRunnableDecorator(r), prefix + nextId.incrementAndGet());
        try {
            if (t.isDaemon() != daemon) {
                t.setDaemon(daemon);
            }

            if (t.getPriority() != priority) {
                t.setPriority(priority);
            }
        } catch (Exception ignored) {
            // Doesn't matter even if failed to set.
        }
        return t;
    }

    public  DefaultThreadFactory(Class<?> poolType);
    public  DefaultThreadFactory(String poolName);
    public  DefaultThreadFactory(Class<?> poolType, boolean daemon);
    public  DefaultThreadFactory(String poolName, boolean daemon);
    public  DefaultThreadFactory(Class<?> poolType, int priority);
    public  DefaultThreadFactory(String poolName, int priority);
    public  DefaultThreadFactory(Class<?> poolType, boolean daemon, int priority);
    public  DefaultThreadFactory(String poolName, boolean daemon, int priority, ThreadGroup threadGroup);
    public  DefaultThreadFactory(String poolName, boolean daemon, int priority);

}