summaryrefslogtreecommitdiffstats
path: root/vespajlib/src/main/java/com/yahoo/tensor/evaluation/MapEvaluationContext.java
diff options
context:
space:
mode:
Diffstat (limited to 'vespajlib/src/main/java/com/yahoo/tensor/evaluation/MapEvaluationContext.java')
-rw-r--r--vespajlib/src/main/java/com/yahoo/tensor/evaluation/MapEvaluationContext.java11
1 files changed, 4 insertions, 7 deletions
diff --git a/vespajlib/src/main/java/com/yahoo/tensor/evaluation/MapEvaluationContext.java b/vespajlib/src/main/java/com/yahoo/tensor/evaluation/MapEvaluationContext.java
index b9394da31e3..9fe6b7d053f 100644
--- a/vespajlib/src/main/java/com/yahoo/tensor/evaluation/MapEvaluationContext.java
+++ b/vespajlib/src/main/java/com/yahoo/tensor/evaluation/MapEvaluationContext.java
@@ -11,20 +11,17 @@ import java.util.HashMap;
* @author bratseth
*/
@Beta
-public class MapEvaluationContext implements EvaluationContext<TypeContext.Name> {
+public class MapEvaluationContext implements EvaluationContext {
private final java.util.Map<String, Tensor> bindings = new HashMap<>();
+ static MapEvaluationContext empty() { return new MapEvaluationContext(); }
+
public void put(String name, Tensor tensor) { bindings.put(name, tensor); }
@Override
public TensorType getType(String name) {
- return getType(new Name(name));
- }
-
- @Override
- public TensorType getType(Name name) {
- Tensor tensor = bindings.get(name.toString());
+ Tensor tensor = bindings.get(name);
if (tensor == null) return null;
return tensor.type();
}