Example usage for org.apache.commons.collections4 FactoryUtils constantFactory

List of usage examples for org.apache.commons.collections4 FactoryUtils constantFactory

Introduction

In this page you can find the example usage for org.apache.commons.collections4 FactoryUtils constantFactory.

Prototype

public static <T> Factory<T> constantFactory(final T constantToReturn) 

Source Link

Document

Creates a Factory that will return the same object each time the factory is used.

Usage

From source file:com.tussle.postprocess.PostprocessSystem.java

public PostprocessSystem(int p) {
    super(p);//from   w ww. j  av a  2  s.c  om
    componentListMap = LazyMap.lazyMap(new LinkedHashMap<Class<Component>, Map<Entity, PostprocessStep>>(),
            () -> LazyMap.lazyMap(new LinkedHashMap<>(), FactoryUtils.constantFactory(((Component c) -> {
            }))));
}