package com.hammurapi.common;

import java.util.Map;

import com.hammurapi.common.TokenExpander.TokenSource;

/**
 * Implementation of token source with tokens stored
 * in a map.
 * @author Pavel Vlasov
 *
 */
public class MapTokenSource implements TokenSource {
	
	private Map<String, String> map;

	public MapTokenSource(Map<String, String> map) {
		this.map = map;
	}

	public String getToken(String name) {
		return map.get(name);
	}

}
