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

org.javabuilders.handler.AbstractPropertyHandler Maven / Gradle / Ivy

The newest version!
/**
 * 
 */
package org.javabuilders.handler;

import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;

/**
 * Abstract class to make writing property handlers easier
 * @author Jacek Furmankiewicz
 *
 */
public abstract class AbstractPropertyHandler implements IPropertyHandler {

	private Set consumedKeys = new HashSet();
	
	/**
	 * Constructor
	 * @param consumedKeys The list of keys this handler consumes (one handler can consume multiple ones, if required)
	 */
	public AbstractPropertyHandler(String... consumedKeys) {
		this(new HashSet(Arrays.asList(consumedKeys)));
	}
	
	/**
	 * Constructor
	 * @param consumedKeys The list of keys this handler consumes (one handler can consume multiple ones, if required)
	 */
	public AbstractPropertyHandler(Set consumedKeys) {
		this.consumedKeys = consumedKeys;
	}


	
	/* (non-Javadoc)
	 * @see org.javabuilders.IKeyValueConsumer#getConsumedKeys()
	 */
	public Set getConsumedKeys() {
		return consumedKeys;
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy