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

it.netgrid.bauer.helpers.NOPTopicFactory Maven / Gradle / Ivy

There is a newer version: 1.1.6
Show newest version
package it.netgrid.bauer.helpers;

import java.util.HashMap;
import java.util.Map;

import it.netgrid.bauer.ITopicFactory;
import it.netgrid.bauer.Topic;

public class NOPTopicFactory implements ITopicFactory {
    
    final Map> topics = new HashMap>();

	@Override
	public  Topic getTopic(String name) {
    	@SuppressWarnings("unchecked")
    	NOPTopic topic = (NOPTopic)topics.get(name);
    	if(topic == null) {
    		topic = new NOPTopic();
    		topics.put(name, topic);
    	}
    	
    	return (Topic) topic;
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy