]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.spreadsheet.graph/src/org/simantics/spreadsheet/graph/formula/SpreadsheetEvaluationEnvironment.java
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.spreadsheet.graph / src / org / simantics / spreadsheet / graph / formula / SpreadsheetEvaluationEnvironment.java
index b1b9ad0c60fc2a23897af8ddbc2516bc8313b662..2747a337b0e5a0eb108b68517ea8cff6c413870e 100644 (file)
@@ -1,58 +1,58 @@
-package org.simantics.spreadsheet.graph.formula;\r
-\r
-import java.util.HashMap;\r
-import java.util.Map;\r
-\r
-import org.simantics.spreadsheet.graph.CellFormulaFunction;\r
-import org.simantics.spreadsheet.graph.SpreadsheetBook;\r
-\r
-public class SpreadsheetEvaluationEnvironment {\r
-\r
-    final private SpreadsheetBook book;\r
-    private Map<String, CellFormulaFunction<?>> functions = new HashMap<>();\r
-    public int iterationLimit = 100;\r
-\r
-    public SpreadsheetEvaluationEnvironment(SpreadsheetBook book) {\r
-        this.book = book;\r
-\r
-        functions.put("MATCH", new MatchFormulaFunction());\r
-        functions.put("ISERROR",new IsErrorFormulaFunction());\r
-        functions.put("IFERROR",new IfErrorFormulaFunction());\r
-        functions.put("IF", new IfFormulaFunction());\r
-        functions.put("OR", new OrFormulaFunction());\r
-        functions.put("AND", new AndFormulaFunction());\r
-        functions.put("ROUND", new RoundFormulaFunction());\r
-        functions.put("ROUNDUP", new RoundupFormulaFunction());\r
-        functions.put("SQRT", new SqrtFormulaFunction());\r
-        functions.put("PI", new PiFormulaFunction());\r
-        functions.put("COUNTIF", new CountifFormulaFunction());\r
-        functions.put("SUM", new SumFormulaFunction());\r
-        functions.put("AVERAGE", new AverageFormulaFunction());\r
-        functions.put("SUMIF", new SumifFormulaFunction());\r
-        functions.put("VLOOKUP", new VlookupFormulaFunction());\r
-        functions.put("HLOOKUP", new HlookupFormulaFunction());\r
-        functions.put("TODAY", new TodayFormulaFunction());\r
-        functions.put("LINEST", new LinestFormulaFunction());\r
-        functions.put("GEOMEAN", new GeomeanFormulaFunction());\r
-    }\r
-\r
-    public CellFormulaFunction<?> getFunction(String name) {\r
-        return functions.get(name);\r
-    }\r
-\r
-    public SpreadsheetBook getBook() {\r
-        return book;\r
-    }\r
-\r
-    public static Map<SpreadsheetBook, SpreadsheetEvaluationEnvironment> INSTANCES = new HashMap<>();\r
-\r
-    public static SpreadsheetEvaluationEnvironment getInstance(SpreadsheetBook book) {\r
-        SpreadsheetEvaluationEnvironment env = INSTANCES.get(book);\r
-        if (env == null) {\r
-            env = new SpreadsheetEvaluationEnvironment(book);\r
-            INSTANCES.put(book, env);\r
-        }\r
-        return env;\r
-    }\r
-\r
-}\r
+package org.simantics.spreadsheet.graph.formula;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.simantics.spreadsheet.graph.CellFormulaFunction;
+import org.simantics.spreadsheet.graph.SpreadsheetBook;
+
+public class SpreadsheetEvaluationEnvironment {
+
+    final private SpreadsheetBook book;
+    private Map<String, CellFormulaFunction<?>> functions = new HashMap<>();
+    public int iterationLimit = 100;
+
+    public SpreadsheetEvaluationEnvironment(SpreadsheetBook book) {
+        this.book = book;
+
+        functions.put("MATCH", new MatchFormulaFunction());
+        functions.put("ISERROR",new IsErrorFormulaFunction());
+        functions.put("IFERROR",new IfErrorFormulaFunction());
+        functions.put("IF", new IfFormulaFunction());
+        functions.put("OR", new OrFormulaFunction());
+        functions.put("AND", new AndFormulaFunction());
+        functions.put("ROUND", new RoundFormulaFunction());
+        functions.put("ROUNDUP", new RoundupFormulaFunction());
+        functions.put("SQRT", new SqrtFormulaFunction());
+        functions.put("PI", new PiFormulaFunction());
+        functions.put("COUNTIF", new CountifFormulaFunction());
+        functions.put("SUM", new SumFormulaFunction());
+        functions.put("AVERAGE", new AverageFormulaFunction());
+        functions.put("SUMIF", new SumifFormulaFunction());
+        functions.put("VLOOKUP", new VlookupFormulaFunction());
+        functions.put("HLOOKUP", new HlookupFormulaFunction());
+        functions.put("TODAY", new TodayFormulaFunction());
+        functions.put("LINEST", new LinestFormulaFunction());
+        functions.put("GEOMEAN", new GeomeanFormulaFunction());
+    }
+
+    public CellFormulaFunction<?> getFunction(String name) {
+        return functions.get(name);
+    }
+
+    public SpreadsheetBook getBook() {
+        return book;
+    }
+
+    public static Map<SpreadsheetBook, SpreadsheetEvaluationEnvironment> INSTANCES = new HashMap<>();
+
+    public static SpreadsheetEvaluationEnvironment getInstance(SpreadsheetBook book) {
+        SpreadsheetEvaluationEnvironment env = INSTANCES.get(book);
+        if (env == null) {
+            env = new SpreadsheetEvaluationEnvironment(book);
+            INSTANCES.put(book, env);
+        }
+        return env;
+    }
+
+}