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

nyla.solutions.commas.MapCommandFactsDAO Maven / Gradle / Ivy

The newest version!
package nyla.solutions.commas;


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

/**
 * Default implementation of a CommasDAO
 * @author Gregory Green
 *
 */
public class MapCommandFactsDAO implements CommandFactsDAO
{
	
	/**
	 * 
	 * @see nyla.solutions.commas.CommandFactsDAO#findCommandByKey(java.lang.String)
	 */
	public CommandFacts findFactsByKey(String key)
	{
		
		return mapCommandFacts.get(key);
	}// --------------------------------------------------------

	/**
	 * 
	 * @see nyla.solutions.commas.CommandFactsDAO#saveByKey(java.lang.String, nyla.solutions.commas.Command)
	 */
	public CommandFacts saveByKey(String key, CommandFacts value)
	{
		return  mapCommandFacts.put(key, value);
	}// --------------------------------------------------------
	
	@Override
	public Set selectFactKeys()
	{
		return mapCommandFacts.keySet();
	}

	private Map mapCommandFacts = new HashMap();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy