aboutsummaryrefslogtreecommitdiff
path: root/project/JavaCommon/src/com/modulus/dataread/expressions/StatementFactory.java
diff options
context:
space:
mode:
authorJoshua Rahm <joshua.rahm@colorado.edu>2015-01-27 18:40:32 -0700
committerJoshua Rahm <joshua.rahm@colorado.edu>2015-01-27 18:40:32 -0700
commit5f3fb9afece2125cbeba79d61a8d88460b7878d7 (patch)
treeb0e1e60bae9927a9449561bf7fe9431a54d12be9 /project/JavaCommon/src/com/modulus/dataread/expressions/StatementFactory.java
downloadLegacyQBar-5f3fb9afece2125cbeba79d61a8d88460b7878d7.tar.gz
LegacyQBar-5f3fb9afece2125cbeba79d61a8d88460b7878d7.tar.bz2
LegacyQBar-5f3fb9afece2125cbeba79d61a8d88460b7878d7.zip
initial commit
Diffstat (limited to 'project/JavaCommon/src/com/modulus/dataread/expressions/StatementFactory.java')
-rw-r--r--project/JavaCommon/src/com/modulus/dataread/expressions/StatementFactory.java28
1 files changed, 28 insertions, 0 deletions
diff --git a/project/JavaCommon/src/com/modulus/dataread/expressions/StatementFactory.java b/project/JavaCommon/src/com/modulus/dataread/expressions/StatementFactory.java
new file mode 100644
index 0000000..16da8aa
--- /dev/null
+++ b/project/JavaCommon/src/com/modulus/dataread/expressions/StatementFactory.java
@@ -0,0 +1,28 @@
+package com.modulus.dataread.expressions;
+
+import java.util.Map;
+
+/**
+ * Interface describes how an object is supposed to
+ * generate statements. This class is to be used int tandem
+ * with the ExpressionParser interface to generate
+ * Statements of a specific type;
+ *
+ * @author jrahm
+ *
+ * @param <T> the type of statement this StatementFactory creates
+ */
+public interface StatementFactory<T extends Statement> {
+
+ /**
+ * Creates a new statement with the type <code>T</code> based
+ * on what the parameters contain.
+ *
+ * The parameters contain useful information about where the parser
+ * currently is and how to create the new statement.
+ *
+ * @param params the parameters
+ * @return a new statement of type <code>T</code> based off of the parameters.
+ */
+ T generateStatement(Map<String, Object> params);
+}