Code example for Set

Methods: contains

0
	public Set<MessageHandler> getSubscribers() {
		return Collections.<MessageHandler>unmodifiableSet(this.handlers);
	} 
 
	public boolean hasSubscription(MessageHandler handler) {
		return this.handlers.contains(handler);
	} 
 
	@Override 
	public boolean subscribe(MessageHandler handler) {
		boolean result = this.handlers.add(handler);
		if (result) {
			if (logger.isDebugEnabled()) { 
				logger.debug(getBeanName() + " added " + handler);
			} 
		} 
		return result;
	} 
 
	@Override 
Contextual code suggestions in your IDE  Get Codota for Java