summaryrefslogtreecommitdiff
path: root/JPratt/src/main/java/com/ashardalon/pratt/commands/MetaInitialCommand.java
blob: 7b9aae0b62320d4e22874d400f6b1064613ba0e5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package com.ashardalon.pratt.commands;

import com.ashardalon.pratt.ParserContext;

/**
 * A 'meta-command' that yields the actual command to use.
 * 
 * @author bjculkin
 * 
 * @param <K>
 *            The key type of the context.
 * @param <V>
 *            The value type of the context.
 * @param <C>
 *            The storage type of the context.
 *
 */
public interface MetaInitialCommand<K, V, C> {
	/**
	 * Get the command to use.
	 * 
	 * @param ctx
	 *            The current parser context.
	 * @return The command to use.
	 */
	InitialCommand<K, V, C> getCommand(ParserContext<K, V, C> ctx);
}