All Downloads are FREE. Search and download functionalities are using the official Maven repository.

de.intarsys.tools.functor.StandardFunctorOutlet Maven / Gradle / Ivy

There is a newer version: 4.11
Show newest version
package de.intarsys.tools.functor;

import java.util.ArrayList;
import java.util.List;


public class StandardFunctorOutlet implements IFunctorOutlet {

	private List factories = new ArrayList();

	public List getFunctorFactories() {
		return new ArrayList(factories);
	}

	public IFunctorFactory lookupFunctorFactory(String id) {
		if (id == null) {
			return null;
		}
		for (IFunctorFactory factory : factories) {
			if (factory.getId().equals(id)) {
				return factory;
			}
		}
		return null;
	}

	public void registerFunctorFactory(IFunctorFactory factory) {
		factories.add(factory);
	}

	public void unregisterFunctorFactory(IFunctorFactory factory) {
		factories.remove(factory);
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy