Creates a new DSet of the appropriate generic type.
182264
public static <E extends DSet.Entry> DSet<E> newDSet (Iterable<? extends E> source)
    {
        return new DSet<E>(source);
    }
894236
@SafeVarargs
	public static <T> HashSet<T> newHashSet(T... ts) {
		return newHashSet(false, ts);
	}
318444
public ParamConfigBuilder newParamConfig(Class<?> type, Type genericType){
        return paramConfigBuilderFactory.newInstance(type, genericType);
    }
1068778
@SuppressWarnings("unchecked")
    @Override
    public T newInstance() throws DempsyException {
        return wrap(() -> (T) cloneMethod.invoke(prototype));
    }
956301
@Deprecated
    public static <T> DslTemplate<T> dslTemplate(Class<? extends T> cl, String template, ImmutableList<?> args) {
        return dslTemplate(cl, createTemplate(template), args);
    }
942886
public static synchronized <T> T createNiceMockAndExpectNew(Class<T> type, Object... arguments) throws Exception {
        T mock = createNiceMock(type);
        IExpectationSetters<T> expectationSetters = expectNiceNew(type, arguments);
        if (expectationSetters != null) {
            expectationSetters.andReturn(mock);
        }
        return mock;
    }
1286453
public <T> T createInstance(DatastoreType datastoreType, DynamicType<?> types) {
        return newInstance(getDatastoreId(datastoreType), datastoreType, types, TransactionalCache.Mode.WRITE);
    }
1188195
public static DSFactory create(Setting setting) {
		final DSFactory dsFactory = doCreate(setting);
		log.debug("Use [{}] DataSource As Default", dsFactory.dataSourceName);
		return dsFactory;
	}
69757
public <T> T create(Class<T> cls, Object... varValues) {
        return cls.cast(createWithValues(varValues));
    }
265422
public static <T> Set<T> createSet(T... args) {
        HashSet<T> newSet = new HashSet<T>();
        Collections.addAll(newSet, args);
        return newSet;
    }
994869
@SuppressWarnings("unchecked")
    public static <T> T newInstance(String name, Class<?> objectType) {
        return (T) Proxy.newProxyInstance(
                ClassLoaderUtils.getClassLoader(),
                new Class[]{objectType},
                new LazyJndiResolver(name));
    }
628326
public static <T> TreeSetJsonDeserializer<T> newInstance( JsonDeserializer<T> deserializer ) {
        return new TreeSetJsonDeserializer<T>( deserializer );
    }
67433
private IndexedSet<T> createFromIndices(IntSet indx) {
		return new IndexedSet<T>(itemToIndex, indexToItem, indx);
	}
749450
@Override
    public MetaRuleset createMetaRuleset(Class type)
    {
        MetaRuleset ruleset = new MetaRulesetImpl(_delegate.getTag(), type);
        ruleset.ignore("binding");
        ruleset.ignore("event");
        return ruleset;
    }
647634
def new(cls, *args, **kwargs):
        """"""
        new = cls(make_default(getattr(cls, 'spec', {})))
        new.update(args[0] if args and not kwargs else kwargs)
        return new
1300454
public static Type fromExceptionSet(ExceptionSet exceptionSet) throws ClassNotFoundException {
        Type commonSupertype = exceptionSet.getCommonSupertype();
        if (commonSupertype.getType() != Const.T_OBJECT) {
            return commonSupertype;
        }

        ObjectType exceptionSupertype = (ObjectType) commonSupertype;

        String className = exceptionSupertype.getClassName();
        if ("java.lang.Throwable".equals(className)) {
            return exceptionSupertype;
        }
        return new ExceptionObjectType(className, exceptionSet);
    }
1351885
public static <T> TypeChecker<Set<? extends T>> tSet(TypeChecker<? extends T> elementChecker) {
        return new CollectionTypeChecker<>(Set.class, elementChecker);
    }