Example usage for org.apache.commons.collections4.functors InstantiateFactory InstantiateFactory

List of usage examples for org.apache.commons.collections4.functors InstantiateFactory InstantiateFactory

Introduction

In this page you can find the example usage for org.apache.commons.collections4.functors InstantiateFactory InstantiateFactory.

Prototype

public InstantiateFactory(final Class<T> classToInstantiate) 

Source Link

Document

Constructor that performs no validation.

Usage

From source file:de.alpharogroup.collections.MapExtensions.java

/**
 * Factory method for create a new {@link LazyMap} from commons-collections4.
 *
 * @param <K>//w w w.  j a va  2s . c  o m
 *            the generic type of the key
 * @param <V>
 *            the generic type of the value
 *
 * @return The new {@link LazyMap}.
 */
@SuppressWarnings({ "unchecked", "rawtypes" })
public static <K, V> Map<K, V> newLazyMap() {
    return LazyMap.lazyMap(new HashMap<K, V>(), new InstantiateFactory(HashMap.class));
}