// Path: src/main/java/com/turn/camino/render/Function.java
// public interface Function {
// 
// 	/**
// 	 * Invokes function with given parameters and context
// 	 *
// 	 * @param params actual parameters to function call
// 	 * @param context context in which the function operates
// 	 * @return return value of function
// 	 * @throws FunctionCallException
// 	 */
// 	Object invoke(List<?> params, Context context) throws FunctionCallException;
// 
// }


import com.google.common.collect.Maps;
import com.turn.camino.render.Function;
import java.util.Map;
	YESTERDAY("yesterday", new TimeFunctions.Yesterday()),
	TIME_ADD("timeAdd", new TimeFunctions.TimeAdd()),
	TIME_FORMAT("timeFormat", new TimeFunctions.TimeFormat()),
	TIME_PARSE("timeParse", new TimeFunctions.TimeParse()),
	TIME_TO_UNIX_DAY("timeToUnixDay", new TimeFunctions.TimeToUnixDay()),
	UNIX_DAY_TO_TIME("unixDayToTime", new TimeFunctions.UnixDayToTime()),

	// collection functions
	LIST("list", new CollectionFunctions.ListCreate()),
	LIST_GET("listGet", new CollectionFunctions.ListGet()),
	LIST_FIRST("listFirst", new CollectionFunctions.ListFirst()),
	LIST_LAST("listLast", new CollectionFunctions.ListLast()),
	DICT("dict", new CollectionFunctions.DictCreate()),
	DICT_GET("dictGet", new CollectionFunctions.DictGet()),
	SORT("sort", new CollectionFunctions.Sort()),

	// file system functions
	DIR_LIST("dirList", new FileSystemFunctions.DirList()),
	DIR_LIST_NAME("dirListName", new FileSystemFunctions.DirListName()),
	EXISTS("exists", new FileSystemFunctions.Exists()),
	IS_DIR("isDir", new FileSystemFunctions.IsDir()),

	// metric functions
	METRIC_AGG("metricAgg", new MetricFunctions.MetricAggregateFunction()),
	AGE("age", new MetricFunctions.Age()),
	COUNT("count", new MetricFunctions.Count()),
	SIZE("size", new MetricFunctions.Size()),
	CREATION_DELAY("creationDelay", new MetricFunctions.CreationDelay());

	private final String name;
// Path: src/main/java/com/turn/camino/render/Function.java
// public interface Function {
// 
// 	/**
// 	 * Invokes function with given parameters and context
// 	 *
// 	 * @param params actual parameters to function call
// 	 * @param context context in which the function operates
// 	 * @return return value of function
// 	 * @throws FunctionCallException
// 	 */
// 	Object invoke(List<?> params, Context context) throws FunctionCallException;
// 
// }


// Path: src/main/java/com/turn/camino/render/functions/FunctionEnum.java
import com.google.common.collect.Maps;
import com.turn.camino.render.Function;
import java.util.Map;

	YESTERDAY("yesterday", new TimeFunctions.Yesterday()),
	TIME_ADD("timeAdd", new TimeFunctions.TimeAdd()),
	TIME_FORMAT("timeFormat", new TimeFunctions.TimeFormat()),
	TIME_PARSE("timeParse", new TimeFunctions.TimeParse()),
	TIME_TO_UNIX_DAY("timeToUnixDay", new TimeFunctions.TimeToUnixDay()),
	UNIX_DAY_TO_TIME("unixDayToTime", new TimeFunctions.UnixDayToTime()),

	// collection functions
	LIST("list", new CollectionFunctions.ListCreate()),
	LIST_GET("listGet", new CollectionFunctions.ListGet()),
	LIST_FIRST("listFirst", new CollectionFunctions.ListFirst()),
	LIST_LAST("listLast", new CollectionFunctions.ListLast()),
	DICT("dict", new CollectionFunctions.DictCreate()),
	DICT_GET("dictGet", new CollectionFunctions.DictGet()),
	SORT("sort", new CollectionFunctions.Sort()),

	// file system functions
	DIR_LIST("dirList", new FileSystemFunctions.DirList()),
	DIR_LIST_NAME("dirListName", new FileSystemFunctions.DirListName()),
	EXISTS("exists", new FileSystemFunctions.Exists()),
	IS_DIR("isDir", new FileSystemFunctions.IsDir()),

	// metric functions
	METRIC_AGG("metricAgg", new MetricFunctions.MetricAggregateFunction()),
	AGE("age", new MetricFunctions.Age()),
	COUNT("count", new MetricFunctions.Count()),
	SIZE("size", new MetricFunctions.Size()),
	CREATION_DELAY("creationDelay", new MetricFunctions.CreationDelay());

	private final String name;
	private final Function function;