List of usage examples for org.apache.commons.collections4.functors InstantiateFactory InstantiateFactory
public InstantiateFactory(final Class<T> classToInstantiate)
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)); }