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

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

Introduction

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

Prototype

public static Factory constantFactory(Object constantToReturn) 

Source Link

Document

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

Usage

From source file:org.openconcerto.utils.cc.Factory.java

public static final <N> IFactory<N> constantFactory(final N constantToReturn) {
    return new IFactoryWrapper<N>(FactoryUtils.constantFactory(constantToReturn));
}